standardnotes / desktop

[Moved to https://github.com/standardnotes/app] A free, open-source, and end-to-end encrypted notes app. https://standardnotes.com
GNU Affero General Public License v3.0
1.4k stars 115 forks source link

Slow search #813

Open khalil-i-o opened 2 years ago

khalil-i-o commented 2 years ago

Searching for a word takes approximately ~26 seconds.

A problem that appears randomly. I noticed some repeating patterns despite the randomness of the problem:

It is random because sometimes:

I do not have SpellChecker enabled, I have approximately 900 notes and 60 tags, many notes exceed 200000 characters.

_Version in use: 3.9.15 Linux-x8664 (AppImage) Operating System: Ubuntu 20.04

Video: https://user-images.githubusercontent.com/68512577/149605298-154585dc-facb-4b62-b985-228aa54ab780.mp4

moughxyz commented 2 years ago

What's your total data size, if you were to export an encrypt or decrypted backup file?

khalil-i-o commented 2 years ago

Encrypted backup has a size of 11,7 MB (11.741.880 bytes)

moughxyz commented 2 years ago

Hmm, it could be that the issue occurs as more and more data or UI elements are loaded into memory. Can you test whether this issue happens on a fresh app launch?

khalil-i-o commented 2 years ago

I will try logging out and reinstalling the application, is there any way to clear cache or temporary files in the linux application (AppImage)?

moughxyz commented 2 years ago

You don't need to log out or reinstall or anything. Just quit the app and re-open it to clear out memory state.

khalil-i-o commented 2 years ago

So I did it and the problem persists.

I could notice that generally (not in all cases but in the great majority) the error appears when I edit some big note with many characters.

moughxyz commented 2 years ago

Right well the goal after fresh app launch is not to take any other action but begin searching right away, and see how the performance is. Doing something like "edit some big note with many characters" may definitely affect performance.

khalil-i-o commented 2 years ago

Done. The problem continues but with a lag of 6-10 seconds. I perceived also that it occurs with words that are included in very large notes or words that are present in many notes.