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

[optimizer] More aggressive chunking of common/vendor code #15816

Merged
merged 3 commits into from
Jan 5, 2018

Commits on Jan 3, 2018

  1. [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>
    Tyler Smalley committed Jan 3, 2018
    Configuration menu
    Copy the full SHA
    e3aca1c View commit details
    Browse the repository at this point in the history
  2. Vendors only Kibana direct node_modules

    Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
    Tyler Smalley committed Jan 3, 2018
    Configuration menu
    Copy the full SHA
    313c59c View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2018

  1. Configuration menu
    Copy the full SHA
    9185125 View commit details
    Browse the repository at this point in the history