UI freezes when deleting or renaming large folders in large vaults

Steps to reproduce

  • Create large folder (e.g. Evernote notebook import with inline attachments)
  • Delete it
  • Observe UI freezes while files are deleted

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

Yes (it was faster but still evident)

Expected result

Deletes immediately or has a progress bar so I know how long I have to wait rather than experiencing a freeze.

Actual result

Dialog froze until deletion was completed.

Environment

SYSTEM INFO:
Obsidian version: v1.5.3
Installer version: v1.4.16
Operating system: Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000 23.2.0
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 1
Plugins enabled: 1
1: Importer v1.5.6

RECOMMENDATIONS:
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.


Additional information

I used Importer to import 13k notes from Evernote and many of the notebooks were corrupted when done in a batch, but not when done notebook-by-notebook, but that’s another issue. I ended up having to delete many of the top-level folders to re-import them individually and noticed that deleting a top-level folder in this relatively large vault (13k notes, probably double that in Obisdian items between markdown and attachments) froze the UI, presumably while deleting files. This should be instant even if executed in the background, or have a progress bar.

See also #28285

Small folders in large vaults are also slow to delete, but very large folders (e.g. Evernote’s Unfiled notebook in my case) take a very long time, with Obsidian Helper (Renderer) pegging the CPU:

  • How many files are the we talking about about? the ones being deleted and the overall number of files in the vault.
  • What are your computer specs?
  • how long does it take?

Can you post a screen recording of it happening in restricted mode and restart obsidian?

Thanks, I was able to reproduce. Will work on it