Search very slow (>1 minute)

Searching my vault of 12k notes can take more than 1 minute. Searching the same notes with Visual Studio Code takes no more than 2 seconds.

Steps to reproduce

  1. Do a search that combines a tag (tag:...) with a word (hello) or quoted string (such as "hello()").
  2. If this specific search isn’t done earlier, it can take a minute before the first result shows.

Example where search took 1:40 minutes: video recording.

Expected result

Search should be much faster, definitely not more than 10 seconds.

Actual result

Search easily can take a minute.

Environment

  • Operating system: Windows 10 64-bit.
  • Computer: Intel i5-10400 CPU (6 cores, 12 threads) @ 2.9Ghz with 24GB RAM and a 500GB SSD drive.
  • Obsidian version: 0.12.3

Additional information

  • There are no errors in the Developer Tools’ console.
  • I don’t use community plugins or themes.
  • I couldn’t find Obsidian log files on my computer.
  • I’ve been using this vault on this computer every day for about 3 weeks. So I believe the search index should be cached by now.

(I searched the forum but didn’t find a related report. If I overlooked something, let me know.)

How long does it take to search just for the tag?

Thanks. About 1-2 seconds, even for tags I haven’t searched yet (so un-cached if it works like that).

what if search just "text.align_left"

I did a quick test with VS code. The speed is comparable.
However, what happens is that both Obsidian and VScode are slow the first time you search (while the files are loaded in memory) and then they are fast.

Thanks for looking into it. Is there something I can do to fix it on my end?

Or is there a way for to provide more information, in case the issue is caused by something that wasn’t in your test vault?

I don’t think thare is an issue here. Both obsidian and vscode are slow the first time you search in your vault.
After the first seach, the files are in memory and the search is faster.

Will be fixed on 0.12.5