fonol / anki-search-inside-add-card

An add-on providing full-text-search and PDF reading functionality to Anki's Add card dialog
https://ankiweb.net/shared/info/1781298089
GNU Affero General Public License v3.0
178 stars 24 forks source link

Time limits for searches #72

Open aleksejrs opened 4 years ago

aleksejrs commented 4 years ago

Search takes too long for me. It probably depends on the length of what is searched, so the the limit on the amount of results is not as useful as a limit would be. I'd set something like 5-10 seconds.

fonol commented 4 years ago

Aborting searches running in the background would require some work. Do your searches take longer than 5-10 seconds? Thats quite long. It should be in the range of 50ms - 1000ms. What is your Index type, how many notes does your index contain (both can be seen in the Info dialog), and do you use stopwords for your language?

aleksejrs commented 4 years ago

Do your searches take longer than 5-10 seconds?

Likely much more.

What is your Index type

SQLite FTS4

how many notes does your index contain

49031

do you use stopwords for your language?

A few.

Now it won't search in the PDF reader at all, saying the query was empty after a cleanup.

fonol commented 4 years ago

Difficult to say, if your machine isn't extremely slow, there is definitely something wrong. What language do you use the add-on with / does it contain non-latin characters? Your collection is also quite large, if you specify maybe a small subset of your decks in the decks config entry, are your searches much faster? If so, maybe it really is only the size of your index.

aleksejrs commented 4 years ago

if your machine isn't extremely slow

Maybe it is, since Anki 2.1 is very slow. But no other program is slow just everywhere. The computer is Celeron-based (bought in 2015).

What language do you use the add-on with / does it contain non-latin characters?

The collection is mostly English, Russian, German.

Your collection is also quite large, if you specify maybe a small subset of your decks

I'll try to in a few days (a lockdown is coming).