32sec (!) for a simple keyword search vs <1s on Joplin Desktop.
12k notes. More details below. Any hint appreciated.
Joplin Mobile info
Joplin Mobile 3.3.11 (prod, android)
Device: android
Client ID: 8e7f0542526f4c1db5808f00335a7128
Sync Version: 3
Profile Version: 47
Keychain Supported: No
Alternative instance ID: -
Revision: a962f48b3 (release-3.3)
Automatic Backlinks to note: 3.0.3
Copy Code Blocks: 1.1.3
Embed Search: 2.0.0
Quick Links: 1.3.2
Space Indenter: 0.2.6
Android API level: 30
WebView version: 138.0.7204.157
WebView package: com.google.android.webview
FTS enabled: 1
Hermes enabled: 1
Joplin Desktop info
Joplin 3.3.13 (prod, darwin)
Device: darwin, Apple M4
Client ID: 22e83fad9fa34c9390c0513bcb379b6b
Sync Version: 3
Profile Version: 47
Keychain Supported: Yes
Alternative instance ID: -
Revision: 144ed59
Automatic Backlinks to note: 3.0.3
Backup: 1.4.3
Convert Text To New Note: 1.5.1
Copy Code Blocks: 2.0.0
Embed Search: 2.0.0
Freehand Drawing: 3.0.1
Joplin Batch: 0.2.2
Quick Links: 1.3.2
Search & Replace: 2.2.0
Space Indenter: 0.2.5
Dataset info
Note: 12803/12803
Folder: 17/17
Resource: 22209/22209
Tag: 13/13
NoteTag: 499/499
Revision: 8320/8320
Total: 43861/43861
That doesn't make much sense as the mobile app also uses FTS search which should be very fast (and I see you indeed have it enabled) even with 10K+ notes.
Is that with all search queries or just some of them?
I played with various searches and made some progress. For example 3 of my 12k notes have the cvho keyword in them. If I type very quickly the cvho keyword, mobile search is instant. But if I type a little slowly, e.g. cv then little pause then ho, it takes 30sec and the search animation starts at the little pause after cv.
Ftr a “cv“ search takes 30sec likely due to several hundred results. But I don't care because my searches are usually very specific, only a few notes match.
This seems related to “search as you type“ feature. When I resume typing after a little pause, it shoud immediately abort old search and start new one, but it doesn't. Instead it waits for old search to complete (cv 30s) then only runs new search (cvho <1s).
This is not the first time I have an issue linked to this feature ( "search as you type" broken on mobile · Issue #11032 · laurent22/joplin · GitHub ). I wish there was a way to disable it. Only start search once I click on the magnifier icon.
Maybe the delay before auto-search should depend on the length of the query. It's probably very rare to search for just one or two letter so we should assume the user will type more letters after that and wait a bit longer.
Cancelling the search I don't think it's possible but we could check.
I think this will vary greatly depending on the language, e.g. with Chinese, searching for just one or two characters wouldn’t be anything special. The same is true for Korean, which forms letters into syllables, which are then treated as single “characters” (e.g. if you press the Del
key, it will delete the whole syllable on a single press). I guess the question is what the code treats as a "letter” here.
1 Like
Here is another real life problematic keyword search example I just experienced. I searched for “Fèves” (French word). To type è with the accent I have to long press e, which takes some unavoidable time, and Joplin is already searching for “F” which takes forever ofc because many notes match.
The “type very quick” trick works wonders btw, thank you so much. Except in such example ofc haha.
In this particular example you don't need to type the accent because it's ignored anyway, but I see the point about Chinese character etc