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.
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 termtada
. That means we have to "unpack" the data for every keypress.