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

[Lens][Embeddable] Fix rendering time API #201730

Merged
merged 4 commits into from
Nov 28, 2024

Conversation

dej611
Copy link
Contributor

@dej611 dej611 commented Nov 26, 2024

Summary

This PR implements the new Embeddable API to signalling the render complete event here: #200640

The previous API was relying on the dataLoading API which could report the wrong timing as rendering could take a bit more time, but with the new one (bound to the internal renderingComplete$) it should be correct now.

@dej611 dej611 added Team:Visualizations Visualization editors, elastic-charts and infrastructure release_note:skip Skip the PR/issue when compiling release notes Feature:Lens labels Nov 26, 2024
@dej611 dej611 requested a review from a team as a code owner November 26, 2024 09:14
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

@dej611 dej611 added the backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) label Nov 26, 2024
@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
lens 1.5MB 1.5MB +41.0B

Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

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

I've checked the triggering of the dashboard_loaded and within this PR it get triggered exactly when the chart is rendered as it should be.
On main instead it was triggered before that.
On my test the difference is now pretty visible: from 2s to 3s for the same chart/dashboard.
It was too good to last...

@dej611 dej611 merged commit 43aa838 into elastic:main Nov 28, 2024
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 28, 2024
## Summary

This PR implements the new Embeddable API to signalling the render
complete event here: elastic#200640

The previous API was relying on the `dataLoading` API which could report
the wrong timing as rendering could take a bit more time, but with the
new one (bound to the internal` renderingComplete$`) it should be
correct now.

(cherry picked from commit 43aa838)
@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 Nov 28, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Lens][Embeddable] Fix rendering time API
(#201730)](#201730)

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

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

<!--BACKPORT [{"author":{"name":"Marco
Liberati","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-28T15:22:57Z","message":"[Lens][Embeddable]
Fix rendering time API (#201730)\n\n## Summary\r\n\r\nThis PR implements
the new Embeddable API to signalling the render\r\ncomplete event here:
https://github.com/elastic/kibana/pull/200640\r\n\r\nThe previous API
was relying on the `dataLoading` API which could report\r\nthe wrong
timing as rendering could take a bit more time, but with the\r\nnew one
(bound to the internal` renderingComplete# Backport

This will backport the following commits from `main` to `8.x`:
- [[Lens][Embeddable] Fix rendering time API
(#201730)](#201730)

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

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

<!--BACKPORT ) it should be\r\ncorrect
now.","sha":"43aa838c042af3375485ab57a26e975c68adcf09","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","v9.0.0","backport:prev-minor"],"title":"[Lens][Embeddable]
Fix rendering time
API","number":201730,"url":"https://github.com/elastic/kibana/pull/201730","mergeCommit":{"message":"[Lens][Embeddable]
Fix rendering time API (#201730)\n\n## Summary\r\n\r\nThis PR implements
the new Embeddable API to signalling the render\r\ncomplete event here:
https://github.com/elastic/kibana/pull/200640\r\n\r\nThe previous API
was relying on the `dataLoading` API which could report\r\nthe wrong
timing as rendering could take a bit more time, but with the\r\nnew one
(bound to the internal` renderingComplete# Backport

This will backport the following commits from `main` to `8.x`:
- [[Lens][Embeddable] Fix rendering time API
(#201730)](#201730)

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

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

<!--BACKPORT ) it should be\r\ncorrect
now.","sha":"43aa838c042af3375485ab57a26e975c68adcf09"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201730","number":201730,"mergeCommit":{"message":"[Lens][Embeddable]
Fix rendering time API (#201730)\n\n## Summary\r\n\r\nThis PR implements
the new Embeddable API to signalling the render\r\ncomplete event here:
https://github.com/elastic/kibana/pull/200640\r\n\r\nThe previous API
was relying on the `dataLoading` API which could report\r\nthe wrong
timing as rendering could take a bit more time, but with the\r\nnew one
(bound to the internal` renderingComplete# Backport

This will backport the following commits from `main` to `8.x`:
- [[Lens][Embeddable] Fix rendering time API
(#201730)](#201730)

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

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

<!--BACKPORT ) it should be\r\ncorrect
now.","sha":"43aa838c042af3375485ab57a26e975c68adcf09"}}]}] BACKPORT-->

Co-authored-by: Marco Liberati <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
## Summary

This PR implements the new Embeddable API to signalling the render
complete event here: elastic#200640

The previous API was relying on the `dataLoading` API which could report
the wrong timing as rendering could take a bit more time, but with the
new one (bound to the internal` renderingComplete$`) it should be
correct now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants