nextcloud / nextcloud/notes-android
Slow search in long notes
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 168
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 31
Description
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:
- Create a new note, add a novel of text to it and save by going back to the overview.
- Reenter the note and type a word in the search bar.
- First, the app will only show one letter in the search bar, but you can keep typing on the keyboard. Do so.
- The first search iteration will highlight all findings for the first letter of the word and then starts over instantly again for the full word.
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.
Smartphone (please complete the following information):
- Nextcloud Notes-Version (android app): 4.0.0 RC1
- F-Droid or Play Store: FDroid
- Android-Version: 11
- Device: Sony Xperia
Server
- Nextcloud version: 26.0.0
- Nextcloud Notes version (server app): 4.7.2
Stacktrace
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with a very long note and inspect the note search bar's input-handling entry point. The fix is done when searching waits one second after typing stops and does not run intermediate searches for each character.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100