haukex / de-en-dict

German-English Dictionary
https://dict.zero-g.net/
GNU General Public License v2.0
12 stars 2 forks source link

Short search strings take a long time #15

Closed haukex closed 3 months ago

haukex commented 3 months ago

For example, "e" takes up to 5s on my machine, and "ea" takes ~1s.

Restrict search string length, or show spinner? Other optimizations possible?

haukex commented 3 months ago

I'm currently leaning towards simply not performing one-character searches; the delay on two-character searches is still acceptable IMHO.

haukex commented 1 month ago

Since I merged the Web Worker branch in 2c3bb382c44a3ceab0d3079b2c5f400f4d6f3e22, short search strings are now allowed again because slow searches now display a progress bar instead of blocking the browser.

Edit: Since the branch info is no longer available: the worker branch was 5ea4fc4…2c3bb38