-
Notifications
You must be signed in to change notification settings - Fork 33
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
Use packed emoji #69
Use packed emoji #69
Conversation
const packedEmoji = { | ||
keywords: keywordsMap, | ||
searchTerms: Array.from(keywordsMap.keys()), | ||
emoji: emmojiInfo, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking we can pre-build all of the "alfredItems" and store them here. The benefit would be that we don't need to generate item data during search. The down side would be that we have to load an even larger data object on every search term. Alfred doesn't keep the script in memory. It's re-invoking it for every search term (i.e. every key press).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rmm5t what is your opinion of this? It's meant to address #66 (comment)
Hmm, "wink" is only returning 😜. |
I'm going to go ahead and merge this and tag it for posterity. It's at least as fast as the current implementation on |
@jsumners Tangentially, startup time is a bit too slow for me. Usually I press the emoji shortcut then start typing straight away, e.g. ‶wink″. Usually the box takes too much time to load so it types ‶w″ in the field, and ‶ink″ in the emoji search bar. I haven't profiled the workflow so I'm not sure why it takes time to start up. Would it be possible to asynchronously load everything so that the search box appears straight away? Results would then start appearing after something like 200ms. |
@devnoname120 I don't quite follow what you are saying. I:
Please try the latest release and file a new issue if you still have problems with it. |
@jsumners I directly open the menu by pressing a hotkey: Here is a video that illustrates my issue: illustration.movIn the video, I'm pressing Cmd+Control+c and then I type Currently I'm using emoji v2, it's considerably worse on #66. Unsure about the latest improvements. I'll try the latest version and report back. |
I'm not sure how this is going to be possible. The idea is to create mapped emoji data for faster searching. But in order to serialize the data and rehydrate it quickly at run time, we need access to the file system. I don't think JXA has anything that we can shim into the code to make this happen. It might be time to investigate various methods of integrating https://github.com/bellard/quickjs into the build.