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

fix: reduce charts initialization time up to ~2x #585

Merged
merged 5 commits into from
Oct 14, 2021

Conversation

vursen
Copy link
Contributor

@vursen vursen commented Oct 12, 2021

Description

This PR backports the fix introduced in vaadin/web-components#2348 to reduce the charts initialization time up to ~2x.

Type of change

  • Bugfix

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

src/vaadin-chart.html Outdated Show resolved Hide resolved
@vursen vursen force-pushed the perf/charts/reduce-initialization-time branch from b72e591 to 6135ae0 Compare October 13, 2021 08:10
yuriy-fix
yuriy-fix previously approved these changes Oct 13, 2021
Copy link
Contributor

@yuriy-fix yuriy-fix left a comment

Choose a reason for hiding this comment

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

Some test are failing on p3 and should pass before merging, otherwise LGTM

@vursen vursen force-pushed the perf/charts/reduce-initialization-time branch from 71841da to abc9bcc Compare October 13, 2021 14:50
@@ -136,7 +136,7 @@
const container = fixture('container');
const unattachedChart = document.createElement('vaadin-chart');
unattachedChart.update({title: {text: 'Awesome chart'}});
setTimeout(() => {
Polymer.RenderStatus.beforeNextRender(chart, () => {
Copy link
Contributor Author

@vursen vursen Oct 14, 2021

Choose a reason for hiding this comment

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

Had to replace setTimeout with beforeNextRender as otherwise, the test was failing on iOS.

@web-padawan web-padawan merged commit 4d5ae96 into master Oct 14, 2021
@web-padawan web-padawan deleted the perf/charts/reduce-initialization-time branch October 14, 2021 07:06
@DiegoCardoso DiegoCardoso restored the perf/charts/reduce-initialization-time branch April 15, 2024 11:13
@DiegoCardoso DiegoCardoso deleted the perf/charts/reduce-initialization-time branch April 15, 2024 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants