-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trie Data Structure for Search Completion #302
Comments
Thanks for the suggestion but with normal typing it's fast enough and this is too much work for such a corner case as holding down a key. Perhaps if I'm really bored sometime. |
Understandable. I must ask though:r in normal use of Aux do you ever have mini-stuttering/screen freezes while typing in the search bar? They last only ~200ms but after using it for an entire year its hard to ignore. |
I found a bug that was causing duplicates to be added to the autocomplete list, that's how it got so slow. The bug is fixed now but you still have to run /aux clear item cache and /run ReloadUI() |
Well done, appreciate the follow-up. |
Here's a video demonstration. https://streamable.com/b7uzx2 0:25 -> 1:32: Typed random characters which caused a minute long client freeze. 1:48: Item Cache clear 2:30 Ran into some weird behavior with item caching. I would have thought that searching the item would insert it into the autocomplete cache. Let me know if that is expected behavior. |
While talking in Discord, I would hit my Push-To-Talk keybind
j
while having the Aux window open. The resulting spam ofjjjjjjjjjjjjjjjjjjjjjjjjjj
causes Aux to continuously search for items of the namej
, thenjj
,jjj
, etc. My WoW client then freezes for ~8 seconds due to the sheer number of Aux operations being performed. However oncejj
is typed in, Aux should now know that there is no item namedjj
in the database of item names. Thus auto completion should cease. The way to implement this behavior is a Trie data structure, which is commonly used for text prediction for messaging apps, prefix+suffix searches, etc.Each node of the Trie contains a table which associates letters -> another Trie node. Every item in the game is fed through into the Trie letter by letter. The table itself can be saved to the hard drive so that this process only needs to take place once per install.
The text was updated successfully, but these errors were encountered: