Skip to content

[discover] lazy load actions#211974

Closed
nreese wants to merge 10 commits intoelastic:mainfrom
nreese:discover_actions
Closed

[discover] lazy load actions#211974
nreese wants to merge 10 commits intoelastic:mainfrom
nreese:discover_actions

Conversation

@nreese
Copy link
Copy Markdown
Contributor

@nreese nreese commented Feb 20, 2025

Not huge page load savings, but trying to remove deprecated usage of registering actions so we can remove deprecated methods.

* License v3.0 only", or the "Server Side Public License, v 1".
*/

/*
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

moved loadSharingDataHelpers to public/index.ts to avoid loading getSortForEmbeddable in page load bundle.

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Feb 20, 2025

/ci

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Feb 20, 2025

/ci

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Feb 20, 2025

/ci

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Mar 5, 2025

/ci

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Mar 6, 2025

/ci

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Mar 6, 2025

@elasticmachine merge upstream

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Mar 6, 2025

/ci

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #102 / Stateful Observability - Deployment-agnostic API integration tests SyntheticsAPITests getSyntheticsMonitors get many monitors without params

Metrics [docs]

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
discoverEnhanced 33 23 -10

Async chunks

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

id before after diff
discover 917.9KB 921.0KB +3.1KB
discoverEnhanced 0.0B 4.7KB +4.7KB
total +7.8KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
discoverEnhanced 2 0 -2

Page load bundle

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

id before after diff
discover 44.2KB 41.0KB -3.2KB
discoverEnhanced 7.5KB 5.1KB -2.4KB
total -5.6KB
Unknown metric groups

API count

id before after diff
discoverEnhanced 35 23 -12

async chunk count

id before after diff
discoverEnhanced 0 1 +1

References to deprecated APIs

id before after diff
discover 11 10 -1
discoverEnhanced 2 0 -2
total -3

History

@nreese nreese marked this pull request as ready for review March 6, 2025 17:46
@nreese nreese requested review from a team as code owners March 6, 2025 17:46
@nreese nreese added release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// backport:version Backport to applied version labels v9.1.0 v8.19.0 labels Mar 6, 2025
Copy link
Copy Markdown
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! Looks great overall, although I think there's some overlap with another PR I opened to fully optimize the Discover page load bundle: #208298.

But there are still some improvements here to discoverEnhanced that aren't covered in my PR. Would you mind if we hold off on this one for now until mine is merged, and rebase this after? Would be great to still get the improvements here that aren't addressed in the other PR.

@davismcphee
Copy link
Copy Markdown
Contributor

@nreese Just a quick heads up that #208298 has now been merged.

@nreese nreese closed this May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants