I am checking if I can upgrade from 2.1.22. I use Cardistry, so it will be to .33.
A 15 KB search query I use for prioritization takes 18 seconds with 2.1.22. With .40 and .33 or .26 (the latter is slow either way), it takes over 1.5 minutes.
Filtered decks based on related queries (much shorter and much longer) find nothing.
Well, without seeing the queries it will be hard to give any advice. Anyway, 15 kB are 15,000 ASCII characters which seems like an exorbitant length for a search query thatās generally used with manual input. Why do you need such long queries?
Important cards are to be exported as text to feed MorphManās Readability Analyzer for the generation of a frequency.txt file to prioritize vocab cards (cards with only one unknown morph) by frequency.
To learn the more important new cards first, and to review only the most important ones in case I donāt have enough time in a day.
Canāt really help you with the issue of not finding any cards as this is dependent on your personal collection.
But I did some quick benchmarking and it looks indeed as if the search is drastically slower on 2.1.35 than on 2.1.22 and again a whole lot slower on 2.1.41.
Iāll dig a little deeper. (I have contributed some code to this part of Anki in the last year.)
The bad performance seems mostly restricted to tag searches. On 2.1.22, those were implemented with a fast SQL comparison, but didnāt support escaping wildcards an escpecially werenāt respecting tag boundaries. By now, these issues have been addressed and tags are now compared by regex which should also be the main contributor to the performance loss, though.
It should be possible to have much faster and still correct tag matching but not with the way tags are currently stored (as a single whitespace separated string). I happen to have suggested that only recently, here is the answer I got:
thatās a change we could potentially make in the future, but it will make maintaining compatibility with older clients more of a headache & slow down the upgrade/downgrade process, so I think itās best to keep the notes table untouched for now.
So for the time being, youāre out of luck but maybe tag searches will become fast again in the future.
Thx, I need to download and look at the code to see how itās put together (so busy with my daytime job just now). Another option is to keep a small sqlite-database in memory for the most common queries and sync up with the file database from time to time. Assuming the dbase hits for tags is a bottleneck. Or nest up the single field and prefix values into something easier to query in this in-memory database.
Long time ago I had to do something similar with a then-known-photo-app, but I ended up just using NSDMutableDictionary caches to speed up XML export writing.