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
merged 3 commits into from
Jun 11, 2019

Conversation

c-w
Copy link
Member

@c-w c-w 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
Copy link

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
Copy link
Member Author

c-w commented May 31, 2019

Nice! Thanks for the pointer.

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

@c-w c-w force-pushed the enhancement/reduce-bundle-size branch from f46478e to b5e2f2b Compare June 8, 2019 01:01
@Hironsan Hironsan merged commit d5514ab into doccano:master Jun 11, 2019
@c-w c-w deleted the enhancement/reduce-bundle-size branch June 11, 2019 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants