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

refactor(): add @elastic/apm-rum-core to shared deps #187424

Merged
merged 4 commits into from
Aug 29, 2024

Conversation

afharo
Copy link
Member

@afharo afharo commented Jul 2, 2024

Summary

I noticed that this is leaking onto many plugins due to it being used in @kbn/ebt-tools.

Despite all the savings being declared as async. The reality is that core is in the list, and @kbn/ebt-tools is used during bootstrap to register the performance_metrics event type. So, essentially, we are always loading it during the initial paint.

For maintainers

@afharo afharo added Team:Operations Team label for Operations Team performance release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Team:Performance labels Jul 2, 2024
@afharo
Copy link
Member Author

afharo commented Jul 2, 2024

/ci

@afharo afharo self-assigned this Jul 2, 2024
@afharo
Copy link
Member Author

afharo commented Jul 2, 2024

@elasticmachine merge upstream

@afharo
Copy link
Member Author

afharo commented Jul 2, 2024

/ci

@afharo
Copy link
Member Author

afharo commented Jul 3, 2024

@elasticmachine merge upstream

@afharo
Copy link
Member Author

afharo commented Jul 3, 2024

/ci

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
aiops 632 621 -11
apm 1887 1876 -11
cloudSecurityPosture 682 671 -11
core 517 506 -11
dashboard 563 552 -11
dataQuality 146 135 -11
datasetQuality 277 266 -11
dataVisualizer 788 777 -11
discover 939 928 -11
enterpriseSearch 2287 2285 -2
esqlDataGrid 398 387 -11
eventAnnotationListing 618 607 -11
exploratoryView 255 244 -11
fleet 1208 1206 -2
home 269 267 -2
infra 1581 1570 -11
lens 1480 1469 -11
logsExplorer 599 588 -11
maps 1213 1211 -2
ml 2023 2021 -2
savedObjectsTagging 180 169 -11
securitySolution 5604 5593 -11
slo 855 844 -11
transform 512 501 -11
unifiedDocViewer 258 247 -11
total -230

Async chunks

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

id before after diff
aiops 559.1KB 548.9KB -10.1KB
apm 3.5MB 3.5MB -10.1KB
core 150.9KB 140.8KB -10.1KB
dashboard 503.6KB 493.5KB -10.2KB
dataQuality 111.4KB 101.3KB -10.1KB
datasetQuality 280.4KB 270.3KB -10.1KB
dataVisualizer 798.0KB 787.9KB -10.1KB
discover 809.4KB 799.2KB -10.2KB
enterpriseSearch 2.5MB 2.5MB -2.6KB
eventAnnotationListing 300.8KB 290.7KB -10.1KB
exploratoryView 268.7KB 258.6KB -10.1KB
fleet 1.8MB 1.8MB -2.6KB
infra 1.5MB 1.5MB -10.2KB
lens 1.5MB 1.5MB -10.2KB
maps 3.0MB 3.0MB -2.6KB
ml 4.6MB 4.6MB -2.6KB
savedObjectsTagging 132.6KB 122.5KB -10.1KB
securitySolution 15.8MB 15.8MB -12.9KB
slo 870.0KB 859.9KB -10.2KB
transform 632.5KB 622.4KB -10.1KB
unifiedDocViewer 180.4KB 170.3KB -10.1KB
total -185.5KB

Page load bundle

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

id before after diff
kbnUiSharedDeps-npmDll 6.0MB 6.1MB +88.3KB
kbnUiSharedDeps-srcJs 3.2MB 3.2MB +1.0B
total +88.3KB

History

  • 💔 Build #219252 failed 7033fdbc95d34543c8f1a47770576571dd7d831a
  • 💔 Build #219227 failed accb74fdb0f5a800ee617004bdf57832a90fd2c1

cc @afharo

@afharo afharo force-pushed the add-apm-rum-core-to-shared-deps branch from ce9a3e3 to ee1fb60 Compare August 28, 2024 13:04
@afharo
Copy link
Member Author

afharo commented Aug 28, 2024

/ci

@afharo afharo marked this pull request as ready for review August 28, 2024 15:16
@afharo afharo requested a review from a team as a code owner August 28, 2024 15:16
@elasticmachine
Copy link
Contributor

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

Copy link
Member

@jbudz jbudz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this bringing in more than necessary? We're dropping 10kb from async bundles but pulling in 80kb synchronously.

@afharo
Copy link
Member Author

afharo commented Aug 28, 2024

@jbudz, good point! Let me see if I can apply any tree-shaking of the library.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
aiops 654 589 -65
apm 1939 1874 -65
canvas 1288 1286 -2
cloudSecurityPosture 709 644 -65
core 516 451 -65
dashboard 637 572 -65
dataQuality 162 97 -65
datasetQuality 295 230 -65
dataVisualizer 811 746 -65
discover 1030 965 -65
enterpriseSearch 2303 2301 -2
esql 84 82 -2
esqlDataGrid 418 353 -65
eventAnnotationListing 642 577 -65
exploratoryView 255 190 -65
fleet 1215 1213 -2
home 269 267 -2
infra 1578 1513 -65
lens 1510 1445 -65
logsExplorer 619 554 -65
maps 1234 1232 -2
ml 2025 2023 -2
observability 1118 1053 -65
savedObjectsTagging 180 115 -65
securitySolution 5725 5660 -65
slo 899 834 -65
stackAlerts 155 153 -2
transform 512 447 -65
unifiedDocViewer 283 218 -65
total -1381

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/ui-shared-deps-src 48 49 +1

Async chunks

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

id before after diff
aiops 633.3KB 548.6KB -84.7KB
apm 3.5MB 3.5MB -84.9KB
canvas 1.1MB 1.1MB -2.6KB
core 150.9KB 66.2KB -84.8KB
dashboard 547.3KB 462.5KB -84.8KB
dataQuality 114.1KB 29.6KB -84.5KB
datasetQuality 289.9KB 205.3KB -84.6KB
dataVisualizer 811.0KB 726.3KB -84.7KB
discover 855.8KB 771.0KB -84.9KB
enterpriseSearch 2.6MB 2.6MB -2.6KB
esql 180.8KB 178.1KB -2.7KB
eventAnnotationListing 312.9KB 228.2KB -84.7KB
exploratoryView 268.7KB 184.1KB -84.6KB
fleet 1.8MB 1.8MB -2.6KB
infra 1.5MB 1.5MB -84.9KB
lens 1.5MB 1.5MB -85.1KB
maps 3.0MB 3.0MB -2.6KB
ml 4.6MB 4.6MB -2.6KB
savedObjectsTagging 132.6KB 48.1KB -84.5KB
securitySolution 18.0MB 17.9MB -88.3KB
slo 916.5KB 831.7KB -84.8KB
transform 634.6KB 550.0KB -84.6KB
unifiedDocViewer 205.3KB 120.7KB -84.6KB
total -1.4MB

Page load bundle

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

id before after diff
aiops 7.9KB 7.9KB +61.0B
apm 39.8KB 39.9KB +61.0B
core 420.4KB 420.5KB +39.0B
dashboard 43.3KB 43.4KB +61.0B
dataQuality 7.9KB 7.9KB +60.0B
datasetQuality 49.2KB 49.3KB +61.0B
dataVisualizer 24.4KB 24.5KB +61.0B
discover 47.9KB 48.0KB +60.0B
eventAnnotationListing 11.0KB 11.1KB +61.0B
exploratoryView 44.0KB 44.0KB +59.0B
infra 97.7KB 97.7KB +61.0B
kbnUiSharedDeps-npmDll 6.1MB 6.2MB +88.3KB
kbnUiSharedDeps-srcJs 3.3MB 3.3MB +102.0B
lens 51.6KB 51.7KB +61.0B
savedObjectsTagging 22.7KB 22.8KB +58.0B
securitySolution 86.3KB 86.3KB +38.0B
slo 24.6KB 24.7KB +60.0B
transform 18.6KB 18.7KB +61.0B
unifiedDocViewer 12.0KB 12.1KB +61.0B
total +89.4KB
Unknown metric groups

API count

id before after diff
@kbn/ui-shared-deps-src 57 58 +1

async chunk count

id before after diff
core 4 3 -1
securitySolution 99 98 -1
total -2

History

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

cc @afharo

@afharo afharo merged commit 55781b7 into elastic:main Aug 29, 2024
20 checks passed
@afharo afharo deleted the add-apm-rum-core-to-shared-deps branch August 29, 2024 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting performance release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team Team:Performance v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants