Use OffScreenCanvas API for big data live charts
See original GitHub issueOne-line summary [问题简述]
I am creating an application which shows years of historic data and also keeps plotting new live data from a web socket connection, I am facing real performance issues and UI thread goes blocking, I have been searching on it and I think the solution is this. Make use of OffScreenCanvas API to render live charts with big data smoothly. It is really easy to use with just one line amendment.
canvasElement.transferControlToOffscreen()
Expected behaviour [期望结果]
Live charts with big data should work smoothly.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:14
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Use OffScreenCanvas API for big data live charts · Issue #9232
Make use of OffScreenCanvas API to render live charts with big data smoothly. It is really easy to use with just one line...
Read more >Rendering charts with OffscreenCanvas - Scott Logic Blog
First off we request an OffscreenCanvas from the canvas element using the new transferControlToOffscreen() method. We then call worker.
Read more >Performance | Chart.js
Web workers can use the OffscreenCanvas API (opens new window) to render from a web worker onto canvases in the DOM. Chart.js is...
Read more >Rendering 3d offscreen: Getting max performance using ...
The OffscreenCanvas Web API enables us to transfer the ownership of Canvas DOM elements into workers. Since workers run inside a separate ...
Read more >Real-Time High Performance Rendering with the Offscreen ...
Offscreen Canvas is an up and coming API that allows a developer to offload canvas rendering from the main JS thread in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Has this been implemented in the source yet? I would also like the performance to be improved on large data sets, was there any progress on this aside from @CarterLi forked version? Forgive me if I misunderstood this thread, but it seems very useful as I’ve been testing large data sets with dozens of series lines, it starts to drop FPS pretty quick.
I was able to get drawing working in a web worker using this feature:
Certain features didn’t work, but it’s a good start.