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.
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.
Sorry to revive a bug labeled dead here (and, @WhiteNoise , I know we were talking about some of the same things on my other killed tickets). I’m at v0.13.23 here (v0.12.19 installer), and search still takes about a minute to return a first result for a single-word query that I know is present in four MD files.
That’s on a second attempt; I’m not sure how fast slow the uncached attempt is, since I left the same query running all day yesterday.
And, as I said on that other ticket, I know there are four hits for that word among my 2,526 markdown files because my own cobbled together find/xargs/grep script finds them in just over a second on this SSD ext4 machine. So, speed is definitely possible.
While writing this for the past five minutes or so, the search has been running in Obsidian, and it still has only returned the first of the four results. This doesn’t improve any if I open the four files in question via ctrl+o. (That is, the files are in the folders nominally indexed by Obsidian, and the search apparently does not give any special preference to opened files.)
The first search a day is for me still slow, around 2 minutes to get the first result. But after that, the rest of the day all searches are within 2 seconds.
So what I do is close Obsidian every day with a query in the search field. Then when I launch Obsidian the next day, it automatically does that search.
But as I usually start my day with a different app, Obsidian can in the background do its first slow search of the day.
Would this approach work for you Tomsb? Or all your searches after the daily first also slow?
I ended up writing an unpublished plugin of my own that farms the search out to GNU find. Only tested on Linux; it might work out-of-the-box on Mac, and might also work on windows with some Cygwin magic.
However, for my own markdown search/parsing project, I’ve found that I can get very fast results on a slightly different task (watching for changes to any files in a 500k-file tree, then filtering out any non-markdown changes) by using the Python package watchdog, which, though cross-platform, uses win32file.ReadDirectoryChangesW under the hood on Wind I ended up writing an unpublished plugin of my own that farms the search out to GNU find. Only tested on Linux; it might work out-of-the-box on Mac, and might also work on windows with some Cygwin magic.
However, for my own markdown search/parsing project, I’ve found that I can get very fast results on a slightly different task (watching for changes to any files in a 500k-file tree, then filtering out any non-markdown changes) by using the Python package watchdog, which, though cross-platform, uses win32file.ReadDirectoryChangesW under the hood on Windows. I assume there’s an equivalent interface in Node.js; I’m not really a JS programmer. Building a full-text search index off of this would be relatively easy: you have some sort of callback that is triggered by ReadDirectoryChangesW which updates an index, and then query that index upon demand.
Of course, this Obsidian also needs to work on its initial load time. It really shouldn’t take more than about a minute for it to scan that 500k directory so it at least knows where the markdown files are. The main thing is to use the tools the OS gives you, not reconstruct them from scratch yourself. Doing so might fragment the code across OSs (unless you can rely on nice packages like watchdog to abstract this away for you), but it’s absolutely worthwhile.ows. I assume there’s an equivalent interface in Node.js; I’m not really a JS programmer. Building a full-text search index off of this would be relatively easy: you have some sort of callback that is triggered by ReadDirectoryChangesW