-
-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow search in long notes #1729
Comments
No, there shouldn't. There already is a delay of
Could you please define your long "note"? Are we talking about 100 characters? 1k? 10k? 100k? Maybe you should consider to split your book up into multiple smaller notes? Or can you contribute a search algorithm which is faster at the same O notation? You can find the currently used algorithm here. I guess, what actually would help was some kind of In any way, this can be considered as "enhancement", but I can't see any bug here 😉 |
I'm glad to hear there's already some debouncing implemented, but it doesn't seem to be working for me. Workaround My workaround is to type an infrequent character like "&" or another symbol before typing my actual query. Once I've finished, I delete the "&", and I quickly see what I actually wanted. If I forget the "&", I will actually kill the app and start over. It is that slow. I think this works because it's the highlighting that's so slow. The fewer results, the faster it goes. The initial "&" query is very fast, but a common letter like "e" is unusably slow. If I ensure that there are never very many results at once as I type, it works fine, but you have to admit it's a ridiculous workaround. A little background for my use case, which I realize is unusual: I use Notes to log activities in my day, so I append to a single note frequently. I realize I can split it into multiple notes, and have done so before, but I believe there's room for improvement here. I mainly use the search feature to work around another issue where Notes sometimes forgets my place and jumps to the top of the note (on orientation change or connecting a bluetooth keyboard). This is inconvenient because I always want to append to the bottom of this note. My note is long enough that manually scrolling is time consuming. My workaround is to search for the string "eof" which I keep at the bottom of my note. Here's exactly what happens if I try to search the normal way: The file is 398kb, but the issue started much earlier.
Another note, the vibrations on my keyboard after the first character are delayed too, like 3 seconds. It's possible the app is receiving the rest of the input after the 50ms window, which would explain why the debouncing isn't helping. Suggestions and ideas:
Well, I didn't expect to find the bug, but look at this: cb42949 It looks like the first character has no delay! |
Should partially address nextcloud#1729 and nextcloud#769. Signed-off-by: Robbie Cooper <cooperra@users.noreply.github.com>
Please use GitHub reactions 👍 to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!
Describe the bug
When searching for a term in a very long note, the app doesn't wait for the user to finish typing but starts searching instantly which results in finding matches for the first letter and then recognizing that the user typed a much longer term and starts searching again.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
There should be a search delay of one second after the user stopped typing before the search is triggered. This will result in cutting down the search time by half in long notes.
Screenshots
Search results after the first iteration while the second iteration is running and will produce findings for the entire word soon
Smartphone (please complete the following information):
Server
Stacktrace
The text was updated successfully, but these errors were encountered: