Mod browser search bar#126
Conversation
…Improved naming and clarity.
…receive focus by selection instead of by hovering.
…rd counts haven't actually been used
| inner.clear_cache = clear_cache | ||
| return inner | ||
|
|
||
| # Copied from nltk (https://www.nltk.org/_modules/nltk/metrics/distance.html#jaro_similarity) |
There was a problem hiding this comment.
Is the license compatible?
There was a problem hiding this comment.
I think so, but I'm not sure. It's using the Apache License 2.0, and I'm not sure how this interacts with section 4.
| @@ -0,0 +1,171 @@ | |||
|
|
|||
| def cache(function): | |||
There was a problem hiding this comment.
consider an lru cache? Also, how much data is in the result? If we were running into memory issues, then could we minimise it?
There was a problem hiding this comment.
using sys.getsizeof for measuring, I've managed to max it out on around 12MB using many unrelated long searches on mod description, as such I'm not particularly concerned on the memory usage of the cache. I have considered an lru cache, but as memory does not seem to be a concern and the cache is cleared on screen close, I don't see why the added complexity is needed.
Implemented a modlist search function along with search bars for the ingame mod browser. they are able to search fuzzily, as to correct errors in input.