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

[dashboard] do not async import dashboard actions on plugin load #195616

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Oct 9, 2024

Part of #194171

Notice in the screen shot below, how opening Kibana home page loads async dashboard chunks.
Screenshot 2024-10-09 at 8 38 24 AM

This PR replaces async import with a sync import. The page load bundle size increases but this is no different than the current behavior, just the import is now properly accounted for in page load stats. The next step is to resolve #191642 and reduce the page load impact of registering uiActions (but this is out of scope for this PR).

@nreese
Copy link
Contributor Author

nreese commented Oct 9, 2024

/ci

@elasticmachine
Copy link
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
dashboard 662.4KB 626.7KB -35.7KB

Page load bundle

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

id before after diff
dashboard 23.0KB 50.3KB +27.3KB
Unknown metric groups

async chunk count

id before after diff
dashboard 17 15 -2

@nreese nreese added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas release_note:skip Skip the PR/issue when compiling release notes v9.0.0 v8.16.0 backport:version Backport to applied version labels labels Oct 9, 2024
@nreese nreese marked this pull request as ready for review October 9, 2024 17:00
@nreese nreese requested a review from a team as a code owner October 9, 2024 17:00
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

Copy link
Contributor

@Heenawter Heenawter left a comment

Choose a reason for hiding this comment

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

This is something we've been meaning to do for awhile, so changes are straight forward. Thanks for tackling this - LGTM 👍

@nreese nreese merged commit 7448376 into elastic:main Oct 9, 2024
37 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11259922046

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 9, 2024
…stic#195616)

Part of elastic#194171

Notice in the screen shot below, how opening Kibana home page loads
async dashboard chunks.
<img width="500" alt="Screenshot 2024-10-09 at 8 38 24 AM"
src="https://github.com/user-attachments/assets/2cfdb512-03e4-4634-bb0c-a8d163f98540">

This PR replaces async import with a sync import. The page load bundle
size increases but this is no different than the current behavior, just
the import is now properly accounted for in page load stats. The next
step is to resolve elastic#191642 and
reduce the page load impact of registering uiActions (but this is out of
scope for this PR).

(cherry picked from commit 7448376)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 9, 2024
#195616) (#195655)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[dashboard] do not async import dashboard actions on plugin load
(#195616)](#195616)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Nathan
Reese","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-09T17:21:15Z","message":"[dashboard]
do not async import dashboard actions on plugin load (#195616)\n\nPart
of https://github.com/elastic/kibana/issues/194171\r\n\r\nNotice in the
screen shot below, how opening Kibana home page loads\r\nasync dashboard
chunks.\r\n<img width=\"500\" alt=\"Screenshot 2024-10-09 at 8 38
24 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/2cfdb512-03e4-4634-bb0c-a8d163f98540\">\r\n\r\nThis
PR replaces async import with a sync import. The page load
bundle\r\nsize increases but this is no different than the current
behavior, just\r\nthe import is now properly accounted for in page load
stats. The next\r\nstep is to resolve
#191642 and\r\nreduce the page
load impact of registering uiActions (but this is out of\r\nscope for
this
PR).","sha":"7448376119aa1aad0888eb68449c1b15fd0852ac","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Presentation","release_note:skip","v9.0.0","v8.16.0","backport:version"],"title":"[dashboard]
do not async import dashboard actions on plugin
load","number":195616,"url":"https://github.com/elastic/kibana/pull/195616","mergeCommit":{"message":"[dashboard]
do not async import dashboard actions on plugin load (#195616)\n\nPart
of https://github.com/elastic/kibana/issues/194171\r\n\r\nNotice in the
screen shot below, how opening Kibana home page loads\r\nasync dashboard
chunks.\r\n<img width=\"500\" alt=\"Screenshot 2024-10-09 at 8 38
24 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/2cfdb512-03e4-4634-bb0c-a8d163f98540\">\r\n\r\nThis
PR replaces async import with a sync import. The page load
bundle\r\nsize increases but this is no different than the current
behavior, just\r\nthe import is now properly accounted for in page load
stats. The next\r\nstep is to resolve
#191642 and\r\nreduce the page
load impact of registering uiActions (but this is out of\r\nscope for
this
PR).","sha":"7448376119aa1aad0888eb68449c1b15fd0852ac"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195616","number":195616,"mergeCommit":{"message":"[dashboard]
do not async import dashboard actions on plugin load (#195616)\n\nPart
of https://github.com/elastic/kibana/issues/194171\r\n\r\nNotice in the
screen shot below, how opening Kibana home page loads\r\nasync dashboard
chunks.\r\n<img width=\"500\" alt=\"Screenshot 2024-10-09 at 8 38
24 AM\"\r\nsrc=\"https://github.com/user-attachments/assets/2cfdb512-03e4-4634-bb0c-a8d163f98540\">\r\n\r\nThis
PR replaces async import with a sync import. The page load
bundle\r\nsize increases but this is no different than the current
behavior, just\r\nthe import is now properly accounted for in page load
stats. The next\r\nstep is to resolve
#191642 and\r\nreduce the page
load impact of registering uiActions (but this is out of\r\nscope for
this
PR).","sha":"7448376119aa1aad0888eb68449c1b15fd0852ac"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Nathan Reese <[email protected]>
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:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[uiActions] make trigger action registry async
4 participants