Performance regression on Android since UI change

Once you’ve done the above, delete everything above this line.

Steps to reproduce

  1. Obtain a sandbox vault for Android.
  2. Create a lot of notes in that vault. (E.g. in Zsh, do `for ((i = 0; i < 2000; i++)); do echo hi > test-$i.md; done`.)
  3. Open Obsidian to the sandbox vault.
  4. Wait for indexing to complete.
  5. Swipe down to bring up the command palette.

Did you follow the troubleshooting guide? [Y/N]

Yes.

Expected result

The command palette opens smoothly.

Actual result

The command palette stutters heavily as it opens the first time.

Environment

SYSTEM INFO:
Operating system: android 16 (samsung SM-S911B)
Webview version: 144.0.7559.132
Obsidian version: 1.11.7 (287)
API version: v1.11.7
Login status: not logged in
Language: en
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


My phone is a Samsung S23, so not underpowered by any stretch.

Additional information

I feel reasonably certain this is related to vault size.

This might have something to do with indexing. I noticed that after deleting my 2k test notes, the next time I opened the command palette, it also stuttered. So it might not be about absolute vault size, but also about vault size changes?

2 Likes

I’m experiencing this as well. It’s so bad that I ended up disabling all the animations with this CSS.

/* Only apply to mobile devices */
@media only screen and (max-width: 768px) {
  
  /* Disable all animations and transitions globally */
  body *,
  body *::before,
  body *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
  
  /* Re-enable animations for sidebars and sidebar content */
  .workspace-split.mod-left-split,
  .workspace-split.mod-right-split,
  .workspace-split.mod-left-split *,
  .workspace-split.mod-right-split *,
  .sidebar-toggle-button,
  .mod-left-split .workspace-tabs,
  .mod-right-split .workspace-tabs,
  .workspace-leaf-content[data-type="file-explorer"],
  .workspace-leaf-content[data-type="file-explorer"] *,
  .workspace-leaf-content[data-type="search"],
  .workspace-leaf-content[data-type="search"] *,
  .workspace-leaf-content[data-type="starred"],
  .workspace-leaf-content[data-type="starred"] *,
  .workspace-leaf-content[data-type="tag"],
  .workspace-leaf-content[data-type="tag"] *,
  .workspace-leaf-content[data-type="backlink"],
  .workspace-leaf-content[data-type="backlink"] *,
  .workspace-leaf-content[data-type="outline"],
  .workspace-leaf-content[data-type="outline"] *,
  .nav-files-container,
  .nav-files-container *,
  .tree-item,
  .tree-item *,
  .nav-folder,
  .nav-folder *,
  .nav-file,
  .nav-file * {
    animation-duration: revert !important;
    animation-delay: revert !important;
    transition-duration: revert !important;
    transition-delay: revert !important;
  }
  
}

What does it mean the command palette stutters?

Can you post a screen recording?

@WhiteNoise I’ve uploaded a short screen recording to YouTube. Unfortunately it has been classified as a short so there’s some YouTube UI clutter in the way, but you should still be able to see in the recording how the frame rate drops significantly as the command palette slides up.

I can confirm this. I almost made a bug report myself, but I did not have much time. I have about 1.5k notes in my main vault and it looks almost identical to what was posted in the youtube video. Sometimes (regularly) it is so bad, that it freezes long enough for me to tap in the wrong spot, because I thought the animation was done. I also have a secondary vault with only ~150 files and it does not perform much better, but I don’t use it as often so it’s hard to tell. For me the command palette is not the only instance of this, though (it’s the clearest example) - the whole UI lags too much. Not terribly, but just noticeably more than it should on my device (S23). I’m pretty sure this started after the UI overhaul a few updates ago.

1 Like

I haven’t been unable to reproduce anything anomalous.
I know that for example the first swipe to access the sidebar is slow because they are created on first use.

Zayaraq, can you try to

  1. Use the default theme, Enable restricted mode, restart obsidian
  2. copy paste here the output of show debug info command
  3. make a screen recording of where you see it is slow.

It’s not easy to catch this in a video that can only be a few seconds long, but I managed to get a good recording which is representative (the one right in the beginning) of what I’d see every few minutes. Most of the time it’s not as bad, but sometimes it’s quite a bit worse. https://youtube.com/shorts/YqDz2UTaxGc

I do feel that with snippets and plugins enabled it’s a bit worse still, but it’s not easy to tell for sure. I caught one that was even worse in a recording, but I forgot to disable my snippets, so I did not include it. Just imagine this happening every few minutes - also to other ui elements, but usually not as bad.

SYSTEM INFO:
Obsidian version: 1.12.4 (299)
API version: 1.12.4
Operating system: Android 16 (samsung SM-S911B)
Webview version: 145.0.7632.159
Login status: logged in
Language: en-GB
Catalyst license: insider
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

The video Is not accessible

I’m not sure what the problem is about that. I can access it just fine, even form a different device with a different account. But, when watching it from my phone, it seems like youtube did something to the framerate, so I hope the effect is still obvious :confused: If not I’ll upload it to my google drive and post the link.

Now I can see the video. The only thing that looks slow in that video is the first time you trigger the command palette.

Yes. That’s what I said. Since it’s hard to catch this in a video that can only be a few seconds long I only caught it lagging once. That’s why I said imagine this happening every few minutes to varying degrees. I just opened my phone and it stuttered about 3 times as bad. Also if you’re assuming that it’s only and always the first time accessing it after reloading the app: It’s not. It is worse then, but this happens during normal usage when going back and forth between files and such.

2 Likes

I am facing the same issue. The command palette, quick switcher - any menu that floats up - stutters heavily the first 1-2 times after opening the app. It has been driving me crazy. I have the Samsung S23 as well so I doubt it is a device performance issue.

I have tried disabling community plugins and toggling off all the UI features from the settings - nothing seems to help.

1 Like