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

Enhancement/Reduce bundle size #222

Merged

Conversation

Projects
None yet
3 participants
@c-w
Copy link
Contributor

commented May 24, 2019

This pull request reduces the webpack bundle size by:

  • Splitting mixin.js into two modules so that the dependencies of each mixin only get included in the bundles of views that use the mixin and not in other bundles.
  • Removing all unused highlight.js languages.
  • Scoping the vue-chartjs imports.

The size savings resulting from these changes can be seen in the table below:

Before After Bundle
16K 16K dataset
140K 140K demo_named_entity
140K 140K demo_text_classification
136K 136K demo_translation
744K 176K document_classification
728K 120K download_seq2seq
728K 120K download_sequence_labeling
728K 120K download_text_classification
128K 128K guideline
120K 120K index
116K 116K label
112K 112K projects
740K 172K seq2seq
744K 180K sequence_labeling
520K 487K stats
728K 120K upload_seq2seq
728K 120K upload_sequence_labeling
728K 120K upload_text_classification
@jondavidjohn

This comment has been minimized.

Copy link

commented May 31, 2019

I built a tool to help you analyze webpack bundles for size regressions, and report them directly to GitHub PRs. It's free for open source, so it might be worth checking out and helpful to keep these optimizations from needing to happen again!

https://packtracker.io

image

@c-w

This comment has been minimized.

Copy link
Contributor Author

commented May 31, 2019

Nice! Thanks for the pointer.

@Hironsan would you consider integrating @jondavidjohn's tool?

@c-w c-w force-pushed the CatalystCode:enhancement/reduce-bundle-size branch from f46478e to b5e2f2b Jun 8, 2019

@Hironsan Hironsan merged commit d5514ab into chakki-works:master Jun 11, 2019

3 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
Travis CI - Pull Request Build Passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@c-w c-w deleted the CatalystCode:enhancement/reduce-bundle-size branch Jun 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.