desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Slow search

Open cuathro opened this issue 3 years ago • 8 comments

Searching for a word takes approximately ~26 seconds.

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

  • If a letter is deleted while typing text; as happens in the video, the CPU starts working harder than normal.
  • If you type two words too fast in the search box.

It is random because sometimes:

  • If you repeat the search for the word that produced the lag, the error may not occur again, as it may on the fifth attempt it may get slow again.
  • It happens with words of 3-4 characters or more, but in situations a long word finds it instantly.

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-x86_64 (AppImage) Operating System: Ubuntu 20.04

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

cuathro avatar Jan 15 '22 02:01 cuathro

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

moughxyz avatar Jan 15 '22 13:01 moughxyz

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

cuathro avatar Jan 15 '22 18:01 cuathro

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?

moughxyz avatar Jan 17 '22 13:01 moughxyz

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

cuathro avatar Jan 19 '22 13:01 cuathro

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

moughxyz avatar Jan 19 '22 13:01 moughxyz

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.

cuathro avatar Jan 19 '22 14:01 cuathro

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.

moughxyz avatar Jan 19 '22 14:01 moughxyz

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.

cuathro avatar Jan 21 '22 11:01 cuathro