Closed jsumners closed 2 years ago
Here is a fork that uses v2 if anyone has the same issue in the future: https://github.com/devnoname120/alfred-emoji/releases/tag/v1.11.0
Please work with us instead of immediately starting forks. There has not been a new version published that utilizes the code in this PR as yet. There is plenty of time to work out issues before such happens.
I don't plan to maintain the fork. It's just a quick and dirty solution (mostly for personal use) because I don't plan to invest time fixing the root issue in the short term.
@jsumners I can confirm that the performance issues I was experiencing are resolved now.
Emoji search is significantly slower since this PR was merged.
Hypothesized culprits:
orderedEmoji
is slower than on the primitive type strings ofemojiNames
.O(n)
wheren
is the number of emojis. It's possible thatn
got considerably bigger.If 1. is true, then precomputing a lookup during build would solve it. If 2. is true, we could use some kind of hash structure to precompute first 2-3 search letters, and then narrow down the remaining matches using previous method. This should mostly the solve the speed issues.