Closed KyleMaas closed 3 years ago
@arj03 Not finding a whole lot more opportunities to shrink this. With #221 merged in, do you think we could close this?
I have a tool I'd like to use to figure out what is taking this space. So lets keep it open for now.
This would help a little:
Now I remember the tool: npm i -g disc
Some of the biggest:
Toast: 1.2mb Highlight: 1mb libsodium: 500kb codemirror: 400kb
It should be possible to disable highlight somehow I think. The gain we get from that package seems rather minimal.
Yeah highlight.js comes from ssb-markdown. Maybe add a switch so it can be disabled?
Bip39 is 200kb. Wonder where that is used.
I checked on Bip39 before. It's used for mnemonic keys.
That's part of where I focused my efforts for minifying before, because I noticed the mnemonic key word lists have a ton of whitespace in them. Part of the reason I've been working on shrinking the release bundle rather than the build bundle.
Well, that takes us down to about 3.5MB. Do you think that's good enough, or is there more you'd like to try to do?
I'll close this now. 1mb off compared to last release is pretty good. Thanks for the help with this @KyleMaas :)
You're welcome!
Main dist file is currently about 6.9MB (see https://github.com/arj03/ssb-browser-demo/pull/208#issuecomment-776765786). Let's see if we can shrink that.