Skip to content

[kbn/optimizer] mangle variables in optimizer bundles#112435

Merged
spalger merged 4 commits intoelastic:masterfrom
spalger:implement/mangling-minification
Sep 17, 2021
Merged

[kbn/optimizer] mangle variables in optimizer bundles#112435
spalger merged 4 commits intoelastic:masterfrom
spalger:implement/mangling-minification

Conversation

@spalger
Copy link
Copy Markdown
Contributor

@spalger spalger commented Sep 16, 2021

We've gotten rid of Angular in nearly every part of the app, except a few bundles, so we could start mangling the variable names in nearly every bundle and reduce shipped bundle sizes substantially. By the time we ship 7.16 I hope we can just set this to true across the board.

@spalger spalger force-pushed the implement/mangling-minification branch from 40ec047 to ff85506 Compare September 16, 2021 15:35
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
advancedSettings 912.1KB 874.0KB -38.1KB
apm 3.7MB 2.7MB -1.1MB
canvas 1.6MB 1.0MB -563.6KB
cases 622.3KB 308.4KB -313.9KB
charts 56.0KB 41.8KB -14.2KB
cloud 14.2KB 12.3KB -1.9KB
console 450.0KB 361.8KB -88.3KB
core 215.4KB 132.7KB -82.7KB
crossClusterReplication 275.3KB 165.2KB -110.1KB
dashboard 210.7KB 135.3KB -75.4KB
data 169.1KB 101.2KB -67.9KB
dataEnhanced 75.8KB 46.3KB -29.5KB
dataVisualizer 762.2KB 501.4KB -260.8KB
devTools 4.6KB 2.2KB -2.4KB
discover 583.1KB 378.7KB -204.4KB
enterpriseSearch 2.1MB 1.3MB -840.2KB
esUiShared 11.5KB 7.0KB -4.5KB
expressionError 27.5KB 17.5KB -10.0KB
expressionMetric 1.1KB 493.0B -649.0B
expressionRepeatImage 2.4KB 1.1KB -1.3KB
expressionRevealImage 3.8KB 1.8KB -2.0KB
expressionShape 24.4KB 11.7KB -12.8KB
expressionTagcloud 14.3KB 8.4KB -5.9KB
fileUpload 774.2KB 662.3KB -111.9KB
fleet 1007.2KB 590.0KB -417.2KB
graph 630.6KB 403.6KB -227.0KB
grokdebugger 67.6KB 58.7KB -8.8KB
home 119.7KB 81.7KB -38.0KB
indexLifecycleManagement 245.9KB 155.1KB -90.8KB
indexManagement 847.0KB 525.9KB -321.1KB
indexPatternEditor 175.0KB 121.3KB -53.7KB
indexPatternFieldEditor 262.7KB 149.3KB -113.4KB
indexPatternManagement 371.3KB 318.1KB -53.2KB
infra 1.7MB 934.0KB -779.1KB
ingestPipelines 706.1KB 452.8KB -253.3KB
inputControlVis 150.7KB 87.5KB -63.2KB
inspector 27.9KB 15.2KB -12.8KB
kibanaOverview 18.4KB 9.7KB -8.7KB
kibanaReact 296.4KB 203.6KB -92.9KB
kibanaUtils 90.4KB 52.5KB -37.9KB
lens 1.6MB 1021.0KB -589.3KB
licenseManagement 118.8KB 65.4KB -53.4KB
lists 223.5KB 125.1KB -98.4KB
logstash 46.1KB 30.4KB -15.7KB
management 16.3KB 8.8KB -7.5KB
maps 3.2MB 2.6MB -535.4KB
mapsEms 242.4KB 173.7KB -68.8KB
ml 5.5MB 3.5MB -2.0MB
observability 551.5KB 337.0KB -214.5KB
osquery 1.9MB 1.7MB -231.9KB
painlessLab 28.0KB 16.3KB -11.7KB
presentationUtil 68.7KB 43.1KB -25.6KB
remoteClusters 153.8KB 87.7KB -66.1KB
reporting 70.1KB 43.6KB -26.6KB
rollup 219.9KB 133.9KB -86.0KB
savedObjectsManagement 131.1KB 81.5KB -49.6KB
savedObjectsTagging 76.1KB 42.1KB -34.0KB
searchprofiler 188.9KB 159.1KB -29.8KB
security 747.6KB 480.9KB -266.7KB
securitySolution 6.4MB 4.2MB -2.1MB
share 4.5KB 2.2KB -2.3KB
snapshotRestore 445.1KB 256.2KB -188.9KB
spaces 263.3KB 160.0KB -103.3KB
stackAlerts 199.4KB 158.8KB -40.6KB
telemetryManagementSection 2.5KB 2.2KB -355.0B
timelines 419.6KB 233.3KB -186.3KB
transform 466.7KB 307.6KB -159.1KB
triggersActionsUi 1.2MB 749.1KB -470.8KB
uiActionsEnhanced 11.3KB 6.4KB -4.9KB
upgradeAssistant 181.1KB 103.8KB -77.3KB
uptime 1005.9KB 560.2KB -445.7KB
visDefaultEditor 218.9KB 152.1KB -66.8KB
visTypeMarkdown 10.8KB 6.4KB -4.4KB
visTypeMetric 15.6KB 10.2KB -5.4KB
visTypePie 77.1KB 51.0KB -26.1KB
visTypeTable 28.1KB 17.5KB -10.7KB
visTypeTagcloud 3.6KB 2.2KB -1.4KB
visTypeTimelion 143.9KB 92.3KB -51.5KB
visTypeTimeseries 970.1KB 636.5KB -333.5KB
visTypeVega 2.5MB 1.9MB -573.1KB
visTypeVislib 543.7KB 376.8KB -166.9KB
visTypeXy 114.4KB 62.5KB -51.9KB
visualizations 101.4KB 71.9KB -29.5KB
visualize 87.0KB 51.7KB -35.3KB
watcher 369.1KB 266.9KB -102.3KB
total -15.9MB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
advancedSettings 9.7KB 5.6KB -4.1KB
alerting 61.6KB 38.5KB -23.1KB
apm 46.2KB 29.1KB -17.1KB
apmOss 2.4KB 1.3KB -1.0KB
banners 11.7KB 7.1KB -4.5KB
bfetch 15.9KB 8.9KB -7.0KB
canvas 30.1KB 16.9KB -13.3KB
cases 133.5KB 79.6KB -53.9KB
charts 91.3KB 59.6KB -31.7KB
cloud 10.5KB 6.5KB -4.0KB
console 22.6KB 16.5KB -6.1KB
core 406.6KB 292.7KB -113.9KB
crossClusterReplication 25.2KB 11.8KB -13.4KB
dashboard 303.8KB 184.4KB -119.3KB
dashboardEnhanced 23.8KB 14.0KB -9.8KB
data 778.3KB 492.0KB -286.3KB
dataEnhanced 18.5KB 9.5KB -9.0KB
dataVisualizer 16.3KB 9.0KB -7.3KB
devTools 16.5KB 10.1KB -6.4KB
discover 34.8KB 19.0KB -15.7KB
discoverEnhanced 8.1KB 4.9KB -3.3KB
embeddable 183.9KB 101.9KB -82.1KB
embeddableEnhanced 10.3KB 6.8KB -3.6KB
enterpriseSearch 14.6KB 9.3KB -5.3KB
esUiShared 196.7KB 125.3KB -71.4KB
expressionError 9.3KB 4.8KB -4.6KB
expressionImage 7.1KB 4.4KB -2.7KB
expressionMetric 9.0KB 5.5KB -3.5KB
expressionRepeatImage 10.2KB 6.0KB -4.1KB
expressionRevealImage 11.0KB 6.4KB -4.6KB
expressions 219.0KB 127.1KB -91.9KB
expressionShape 27.3KB 14.9KB -12.4KB
expressionTagcloud 12.2KB 7.2KB -5.0KB
features 6.8KB 4.2KB -2.6KB
fieldFormats 75.1KB 46.4KB -28.7KB
fileUpload 23.7KB 11.9KB -11.8KB
fleet 233.1KB 130.1KB -103.1KB
globalSearch 14.3KB 8.9KB -5.4KB
globalSearchBar 34.4KB 21.6KB -12.8KB
globalSearchProviders 7.8KB 4.5KB -3.3KB
graph 11.3KB 7.2KB -4.1KB
grokdebugger 7.7KB 4.6KB -3.1KB
home 15.5KB 9.7KB -5.9KB
indexLifecycleManagement 48.5KB 27.7KB -20.8KB
indexManagement 37.2KB 29.2KB -8.0KB
indexPatternEditor 21.6KB 11.5KB -10.0KB
indexPatternFieldEditor 37.6KB 18.5KB -19.0KB
indexPatternManagement 6.9KB 4.1KB -2.8KB
infra 147.4KB 88.6KB -58.8KB
ingestPipelines 22.3KB 11.6KB -10.7KB
inputControlVis 9.6KB 5.4KB -4.3KB
inspector 40.1KB 25.1KB -15.0KB
interactiveSetup 75.5KB 50.6KB -24.9KB
kibanaOverview 29.6KB 22.4KB -7.1KB
kibanaReact 157.0KB 99.1KB -57.9KB
kibanaUtils 158.1KB 91.7KB -66.4KB
lens 58.4KB 38.3KB -20.2KB
licenseManagement 18.0KB 11.1KB -7.0KB
licensing 13.3KB 8.5KB -4.7KB
lists 6.6KB 3.5KB -3.1KB
logstash 21.1KB 13.4KB -7.7KB
management 15.8KB 9.6KB -6.3KB
maps 80.8KB 44.3KB -36.5KB
mapsEms 10.0KB 5.0KB -5.0KB
ml 62.3KB 33.8KB -28.5KB
navigation 17.2KB 9.7KB -7.4KB
newsfeed 18.2KB 9.8KB -8.4KB
observability 57.6KB 28.4KB -29.2KB
osquery 13.2KB 7.3KB -5.9KB
painlessLab 19.8KB 13.0KB -6.7KB
presentationUtil 69.7KB 45.0KB -24.7KB
remoteClusters 14.3KB 7.3KB -7.0KB
reporting 68.1KB 40.0KB -28.1KB
rollup 21.7KB 11.6KB -10.1KB
runtimeFields 20.6KB 11.4KB -9.2KB
savedObjects 51.7KB 31.5KB -20.2KB
savedObjectsManagement 30.2KB 18.4KB -11.8KB
savedObjectsTagging 33.0KB 17.9KB -15.1KB
savedObjectsTaggingOss 6.1KB 3.7KB -2.4KB
screenshotMode 3.7KB 2.1KB -1.5KB
searchprofiler 40.4KB 34.4KB -6.0KB
security 84.1KB 48.1KB -35.9KB
securityOss 9.9KB 6.0KB -3.9KB
securitySolution 208.6KB 107.8KB -100.9KB
share 94.2KB 55.9KB -38.3KB
snapshotRestore 47.1KB 28.4KB -18.7KB
spaces 35.6KB 19.9KB -15.7KB
stackAlerts 17.9KB 12.0KB -6.0KB
telemetry 35.0KB 23.5KB -11.5KB
telemetryManagementSection 23.7KB 12.6KB -11.1KB
timelines 305.8KB 164.6KB -141.2KB
transform 18.8KB 12.1KB -6.6KB
triggersActionsUi 91.7KB 50.8KB -40.8KB
uiActions 39.2KB 22.6KB -16.7KB
uiActionsEnhanced 228.6KB 148.7KB -79.9KB
upgradeAssistant 26.7KB 18.8KB -7.9KB
uptime 36.8KB 24.2KB -12.6KB
urlDrilldown 21.4KB 14.6KB -6.9KB
urlForwarding 4.6KB 2.6KB -2.0KB
usageCollection 8.3KB 4.9KB -3.4KB
visDefaultEditor 35.6KB 18.5KB -17.0KB
visTypeMarkdown 12.6KB 7.1KB -5.5KB
visTypeMetric 22.2KB 13.7KB -8.5KB
visTypePie 21.4KB 13.7KB -7.6KB
visTypeTable 24.2KB 14.6KB -9.5KB
visTypeTagcloud 10.0KB 5.8KB -4.2KB
visTypeTimelion 19.1KB 10.2KB -8.9KB
visTypeTimeseries 26.4KB 14.4KB -12.0KB
visTypeVega 55.6KB 35.8KB -19.7KB
visTypeVislib 31.8KB 19.6KB -12.2KB
visTypeXy 62.0KB 40.9KB -21.1KB
visualizations 58.2KB 32.9KB -25.4KB
visualize 27.3KB 15.9KB -11.5KB
watcher 23.1KB 14.7KB -8.5KB
total -2.5MB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@spalger spalger added Team:Operations Kibana-Operations Team v7.16.0 v8.0.0 release_note:skip Skip the PR/issue when compiling release notes labels Sep 17, 2021
@spalger spalger marked this pull request as ready for review September 17, 2021 01:05
@spalger spalger requested a review from a team as a code owner September 17, 2021 01:05
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@tylersmalley
Copy link
Copy Markdown
Member

tylersmalley commented Sep 17, 2021

Shaving 2.5M off page load, no biggie. ;-)

@spalger spalger merged commit 19f3d51 into elastic:master Sep 17, 2021
@spalger spalger deleted the implement/mangling-minification branch September 17, 2021 01:12
@spalger spalger added the auto-backport Deprecated - use backport:version if exact versions are needed label Sep 17, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 17, 2021
Co-authored-by: spalger <spalger@users.noreply.github.com>
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Sep 20, 2021
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

5 similar comments
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Sep 27, 2021
kibanamachine added a commit that referenced this pull request Sep 27, 2021
… and (#113119) (#112498)

* [kbn/optimizer] mangle variables in optimizer bundles (#112435)

Co-authored-by: spalger <spalger@users.noreply.github.com>

* [optimizer] keep classnames to support constructor.name (#113119)

Co-authored-by: spalger <spalger@users.noreply.github.com>
(cherry picked from commit 6612f2b)

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Operations Kibana-Operations Team v7.16.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants