jsumners / alfred-emoji

Alfred workflow for searching and copying emoji
741 stars 32 forks source link

Pojo pack #71

Closed jsumners closed 2 years ago

jsumners commented 2 years ago

Remove the message packing based bundling of emoji in favor of plain old JavaScript objects. This significantly improves the search speed since it removes a couple of layers of unpacking. We lose the faster lookup speed of Map accesses, but that is far outweighed by the parsing speed of the packed data as JSON. The message packed version could probably have been improved if we were in a long lived process. But due to the way Alfred works, our search script has to be loaded on every keypress, e.g. we load four times for the search term tada. That means we have to "unpack" the data for every keypress.