-
Notifications
You must be signed in to change notification settings - Fork 83
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
perf: reduce charts initialization time up to ~2x #2348
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Note: While this PR improves the initialization time of a chart, it is still possible to optimize the time even more by disabling re-drawing the chart in |
Co-authored-by: Sergey Vinogradov <[email protected]>
Co-authored-by: Sergey Vinogradov <[email protected]>
Description
This PR reduces the initialization time of charts up to ~2x by replacing a
redraw
call in a loop (by series) with a singleredraw
at the end of the loop.This PR also is assumed to improve the situation described in the vaadin/flow-components#937 issue.Part of #227
Benchmarks
Machine: Mac Mini M1 16gb.
Browser: Chrome 92.
Screen size: 700x700.
1. Basic case (10 series)
Master branch: 465 ms (screenshot)
Current branch: 145 ms (screenshot)
Total: up to ~3.2x
2. More advanced case (10 series)
Master branch: 4.53 s (screenshot)
Current branch: 2.84 s (screenshot)
Total: up to ~1.6x
Type of change
Checklist