-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[optimize] More aggressive chunking of common/vendor code
Previously, we were not aggressive in combining common code which resulted in duplicates included in the bundles. As an example `node_modules/elasticsearch-browser/elasticsearch.angular.js` is present in the following chunks: * kibana.bundle.js * dashboardViewer.bundle.js * apm.bundle.js * monitoring.bundle.js * ml.bundle.js * timelion.bundle.js * graph.bundle.js Vendored code (anything inside node_modules) is placed in vendors.bundle.js while everything else with more than two references is placed in commons.bundle.js. This has a couple positive side-effects (numbers are with x-pack & canvas): * Decreased build time. Seeing builds go from 475.76 seconds to 274.72. * Decreased memory overhead. Uses roughly 1/3 the memory overhead. * Decreased bundle size. A 68% reduction in overall bundle size. Going from 66.16 MB to 21.13 MB. Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
- Loading branch information
Tyler Smalley
committed
Jan 3, 2018
1 parent
ee2fd5b
commit e3aca1c
Showing
3 changed files
with
21 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters