scambier / obsidian-omnisearch

A search engine that "just works" for Obsidian. Supports OCR and PDF indexing.
GNU General Public License v3.0
1.14k stars 57 forks source link

[BUG] With Omnisearch enabled, opening a note instantly after launching Obsidian leads to a delay reading it #371

Closed gchegr closed 3 months ago

gchegr commented 3 months ago

Problem description:

Opening a note from the Obsidian’s explorer immediately after launching the application makes the header of the current tab change to the opened note’s name, but the contents of it gets loaded much later, up to 5 seconds, both for Windows and Android. On the smartphone it happens every launch, on desktop at least once a day.

Your environment:

Things to try:

scambier commented 3 months ago

You confirm that a) the issue is present when Omnisearch is the only active community plugin, and b) the issue doesn't happen when Omnisearch is not enabled?

gchegr commented 3 months ago

Android — yes, for both A and B. I’ve yet to confirm it for desktop, since this behavior doesn’t happen each time. So far no lags with the plugin disabled.

scambier commented 3 months ago

This freeze is more than likely Omnisearch cache being deserialized and loaded into memory 🤷‍♂️

The only alternative is to disable the cache, which will remove the hard freeze but will make Obsidian sluggish while Omnisearch re-reads all the files at startup.