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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decrease file size #33
Conversation
"light" omits top-level domains that have just one level "complete" serializes the complete list, including top-level domains with just one level (like .com)
@jhnns I believe this is causing installation to fail when running
I was originally trying to run |
This PR introduces a trie-based approach instead of a big regular expression. The trie is built upon
npm install
using thepostinstall
hook. If something goes wrong, thepostinstall
script falls back to a list that has been compiled onprepublish
.Using the trie-based approach, I was able to reduce the parse size from 216 KB to 63 KB. The compressed size went down from 71 KB to 30 KB. And the best thing about it: it's even not a breaking change 馃榿.