Steps to reproduce
When doing a search across the vault, if I leave the search window open, I noticed typing becomes sluggish.
This can be reproduced by searching (a non trivially small) vault and leaving the search open whole typing. Optionally run a performance trace in developer tools.
Did you follow the troubleshooting guide? [Y]
Expected result
Performance shouldn’t be visibly impacted by having the search sidebar open.
Actual result
Sluggish behaviors, possible crashes/bugs exposed by slowdown
Environment
SYSTEM INFO:
Obsidian version: v1.7.0
Installer version: v1.6.7
Operating system: Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 23.5.0
Login status: logged in
Catalyst license: supporter
Insider build toggle: on
Live preview: on
Base theme: light
Community theme: Minimal v7.3.2
Snippets enabled: 4
Restricted mode: off
Plugins installed: 44
Plugins enabled: 8
1: Hotkeys for templates v1.4.3
2: Excalidraw v2.3.0
3: Quick Switcher++ v4.4.0
4: BRAT v1.0.1
5: Git v2.25.0
6: Remember View State v1.0.12
7: Simple CanvaSearch v1.0.0
8: Canvas Link Optimizer v1.2.0
Additional information
Likely explanation and possible solution
What happens is that either keypress events retrigger the search or search loops continuously.
There’s little point having a continuous search (a use case is to search for a typo and then use the results to fix the typo and have it disappear from the initial list).
However, having done a search, there’s no point doing another global search. The only incremental change is the current write offset - so that’s the only thing that needs to be rechecked against the search expression.
Alternatively, at the cost of a flag, you could let disabling the behavior.