Skip to content
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

Compress emoji_data_light.js #5201

Merged
merged 1 commit into from Oct 3, 2017

Conversation

@nolanlawson
Copy link
Collaborator

commented Oct 3, 2017

This compresses emoji_data_light by converting objects to arrays, as suggested by @sorin-davidoi (#5175 (comment)). The size of common.js is reduced from 925 kB (925004) to 868 kB (867839), a savings of 57.2 kB.

I was worried there may be a tradeoff with the cost of decompression, so I tested with perf marks and measured the decompress time as 15ms on a Nexus 5 running Chrome and 4.5ms on the same device running Firefox. So the decompression costs are negligible.

Before and after:

out

It's very likely we could compress this further (e.g. by combining emoji_data_compressed.js and emojione_light.js, but this is a good step in that direction.

@nolanlawson nolanlawson requested a review from sorin-davidoi Oct 3, 2017
@nolanlawson

This comment has been minimized.

Copy link
Collaborator Author

commented Oct 3, 2017

This is live on https://malfunctioning.technology right now

Copy link
Collaborator

left a comment

Awesome! 🚀

@Gargron Gargron merged commit 82d9ade into tootsuite:master Oct 3, 2017
2 checks passed
2 checks passed
codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
rutan added a commit to rutan/mastodon that referenced this pull request Oct 11, 2017
takayamaki added a commit to takayamaki/mastodon that referenced this pull request Oct 12, 2017
cobodo pushed a commit to cobodo/mastodon that referenced this pull request Oct 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.