You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Showing definitions can take a very long time, depending on the word. I did a bit of profiling and it turns out the _format_codes function is to blame, probably because it searches the whole db for every character. I think it would be better to do one db search on startup, and keep a dictionary of (character) -> (code) in memory. What do you think?
For now I've just made _format_codes return an empty string in my local build and it runs much faster! :)
The text was updated successfully, but these errors were encountered:
Showing definitions can take a very long time, depending on the word. I did a bit of profiling and it turns out the
_format_codes
function is to blame, probably because it searches the whole db for every character. I think it would be better to do one db search on startup, and keep a dictionary of (character) -> (code) in memory. What do you think?For now I've just made
_format_codes
return an empty string in my local build and it runs much faster! :)The text was updated successfully, but these errors were encountered: