Frequent, intermittent "hangs" after update to 1.4.5

Hello,

I updated to 1.4.5 yesterday, and I’m struggling with “sluggishness” in the desktop app that wasn’t previously present. This happens with safe mode on, caches cleared and regenerated, default theme, no CSS snippets.

While typing or clicking around, the app periodically becomes unresponsive for a few seconds, often while I’m typing. With developer tools on, I see a corresponding message when this happens: “[Violation] ‘setTimeout’ handler took N ms”, where 190 <= N <= 250ms

Anyone else run into this? Any ideas on further pinpointing the problem?

Don’t move this back to Bugs please. It was moved to Help because it doesn’t follow the template, or provide enough information to reproduce.

You should start by trying to follow the troubleshooting steps:

The debugging steps can help, too. Still stuck? Delete this line and proceed.

Things like updating your installer, plugins, and testing without theme/snippets, etc. (Some of which I see you already tried.)

(Definitely happy to try to help. But Bugs need to follow the template.)

Could you post your “Show Debug Info” too please? (Run the command from the Obsidian command palette.)

Did not use a vanilla vault to try and test this (would defeat the purpose of using Obsidian for what I use it), but I think you may have something here. Using updated installer and app.

1 Like

Sorry @rigmarole, I didn’t realize it was moved, I thought that was my mistake in filing it in the wrong place.

If I missed something with 1.4.5 installer + no community plugins + default theme + no CSS + clean start of obsidian + clearing caches, I’m being blind :slight_smile: .

Something that actually seems to have made a difference is turning off the Core Sync plugin. But I haven’t been able to hammer it enough to be confident in that assertion yet. But I did start noticing sync/edit conflict reports in some cases after I was freed from a momentary “hang” state. But that could just be a red herring related to the fact that I’m getting stalled out while editing.

SYSTEM INFO:
Obsidian version: v1.4.5
Installer version: v1.4.5
Operating system: Darwin Kernel Version 22.6.0: Wed Jul 5 22:21:56 PDT 2023; root:xnu-8796.141.3~6/RELEASE_X86_64 22.6.0
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

If this template will satisfy everyone, we could move it back to bugs… It doesn’t seem an improvement over what was there before, but I understand the requirement.


Steps to reproduce

While typing or clicking around, the app periodically becomes unresponsive for a few seconds, often while I’m typing. This happens intermittently without any obvious triggers.

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

Yes.

This happens with installer 1.4.5, community plugins off, default theme, no CSS snippets.

Expected result

Obsidian reflects the key strokes and other forms of input without any hangs/freezes or delay.

Actual result

While typing or clicking around, the app periodically becomes unresponsive for a few seconds, often while I’m typing or trying to resolve a note link via fuzzy search.

With developer tools → console view, I often see a corresponding message when this happens: “[Violation] ‘setTimeout’ handler took N ms”, where 190 <= N <= 250ms .

Environment

SYSTEM INFO:
Obsidian version: v1.4.5
Installer version: v1.4.5
Operating system: Darwin Kernel Version 22.6.0: Wed Jul 5 22:21:56 PDT 2023; root:xnu-8796.141.3~6/RELEASE_X86_64 22.6.0
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

Can you post a screen recording of this happening in the sandbox vault? What are your computer specs exactly ? Where is your vault stored?

All good. Thanks for clarifying. You didn’t say “installer” in your original post, so you may have been on version 1.4.5 with an out of date installer. The additional details do help. (Like OS, for example.)

I haven’t seen it in the sandbox vault yet. But I will work on getting a video.

There are differences that may matter vs sandbox, like:

  • My vault is 25k files
  • Syncing could be at play

Also, though, the bug template says “We only consider bugs that are reproducible in the sandbox vault or a vault with no third-party plugins/no css snippets/default theme.” Is that not the case?

2019 Macbook pro. 16GB RAM, 2.8GHz 8 core.

iCloud drive, Obsidian’s application folder. This is the only computer that uses the vault. Sync is used for syncing to my phone.

An update. Since I disabled the Sync plugin, I have not been able to reproduce the problem.

I went to turn sync back on to see if it would reproduce again. As a side note, I was surprised that my Sync settings were lost, which is unlike other plugins that I enable/disable.

Since enabling, I have not yet seen these intermittent hangs. I have even turned on other community plugins again, and gone back to my “normal config”. All is well on that front.

BUT sync is also still doing its initial work and “detecting changes”. So I will see how it behaves after that is done.

If you are using Obsidian sync, you should not have your vault on iCloud unless you really know what you are doing.

Ok, great, tell me the failure mode here that’s triggering this problem then? I worry that’s just a convenient hand wave.

  • All my files are locally downloaded, there is no offloading (don’t even have it enabled), I can see that quite easily
  • Sync between my computer and phone has been working just fine for 1 year+
  • I was not using my phone at any time these intermittent hangs occurred
  • I have never experienced any issue like this until updating to 1.4.5 last night

There is nothing SYNCING via iCloud that would be contending with Obsidian Sync. In that case, I would totally believe there would be a problem - with data loss, not intermittent momentary hangs.

Ok, now that sync has completed, I do see these momentary hangs again.

My next two steps:

  • Downgrade again and confirm whether the problem is present there now
  • Move the vault out of iCloud and confirm whether or not that is the root cause

huh…? I don’t get that.

Whether this is the cause of your issue or not, don’t mix syncing tools. Just because it was working before doesn’t mean it’s a good idea.

I have a computer. I have a phone. The computer syncs to the phone with Obsidian sync. Nothing syncs via iCloud, it is used for storage.

Can you explain how there is a mix of syncing methods? The only syncing happens with Obsidian Sync. The documentation is clear on the problematic use case, which I am avoiding:

If you set up the same third-party service on multiple devices, such as your phone, you risk having the service competing with Obsidian Sync whenever you make changes to your vault. This can lead to conflicts, duplicated files, or corrupted files.

This suggests that my use case is totally fine:

To back up your vault using a third-party service, configure the service so that backups are only made from your primary device. For example, if you do most of your writing on your laptop, that’s where you should configure your backups.

Is is that iCloud is not suitable for storing Obsidian files? That is not something I have heard before, and that’s what iCloud is being used for.

Again, if there’s a specific reason that Obsidian Sync doesn’t work with iCloud as a storage mechanism, if there is no risk of conflicting updates to a file, I am glad to hear it.

Back to the actual issue…

The intermittent hangs are not present after I downgrade to 1.3.7. It is present after I upgrade in app to 1.4.5 (so 1.3.7 installer version). A restart of the app after updating was not required. What I notice is that when the hang occurs, the sync status indicator is stuck in an updating state. This is not the case in 1.3.7 - often, if I change the file, I don’t ever see the status change from the green checkmark (but the file shows updated in the logs).

Next, I tried reproducing this problem with a reduced-sized vault (~4500 files). I copied a set of files out, with the same vault config. The goal here was an easier test with less data to copy around.

The problem did not reproduce with the reduced sized repo in either a) iCloud, or b) non-iCloud storage.

What I did notice was that updates to the files did still show the sync status showing the “updating” symbol for sometimes 20s after even a trivial edit. When I hover over this symbol, however, it says “indexing”. I have not been observant enough to note whether that was the case for 1.3.7 and earlier too, and I just didn’t look.

Will see if the full-sized vault repros out of iCloud next.

1 Like

If you keep your vault off iCloud, does it still happen? Do you have any other program that might operate on the vault.

In progress… taking a while to copy the files, re-index, upload the new files to the Sync server, etc.

For size comparison: I have ~53k total files according to obsidian, ~25k of those are markdown. I only sync markdown files, however.

Small case (~4500 files) did not repro even in iCloud.

No. Only Obsidian.

When the hang happen what do the sync log show?

Can you share a perfomance profile while the hangs happen?

Ctrl-shift-I/Cmd-opt-i → performance tab → record button → do the action that lags → wait → stop recording → export to file → zip it and upload it here or DM to us on discord

I’ll DM you, upload failed here.

Often it is just “Uploading file X” / “Upload complete” with no abnormal signs. Here I got a capture while it hanged back-to-back quite quickly, and ended up in one of those “conflict” cases I described earlier.

2023-09-08 19:13 - Connecting to server
2023-09-08 19:13 - Connection successful. Detecting changes...
2023-09-08 19:13 - Resumed. Detecting changes...
2023-09-08 19:13 - Fully synced
2023-09-08 19:13 - Uploading file 000 Inbox/Notebook Updates.md
2023-09-08 19:13 - Upload complete 000 Inbox/Notebook Updates.md
2023-09-08 19:13 - Fully synced
2023-09-08 19:14 - Uploading file 000 Inbox/Notebook Updates.md
2023-09-08 19:14 - Upload complete 000 Inbox/Notebook Updates.md
2023-09-08 19:14 - Server pushed [Phillips-MBP] 000 Inbox/Notebook Updates.md
2023-09-08 19:14 - Uploading file 000 Inbox/Notebook Updates.md
2023-09-08 19:14 - Upload complete 000 Inbox/Notebook Updates.md
2023-09-08 19:14 - Downloading file 000 Inbox/Notebook Updates.md
2023-09-08 19:14 - Downloading complete 000 Inbox/Notebook Updates.md
2023-09-08 19:14 - Accepted 000 Inbox/Notebook Updates.md
2023-09-08 19:14 - Downloading file 000 Inbox/Notebook Updates.md
2023-09-08 19:14 - Downloading complete 000 Inbox/Notebook Updates.md
2023-09-08 19:14 - Accepted 000 Inbox/Notebook Updates.md
2023-09-08 19:14 - Fully synced
1 Like