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

Offscreen Canvas Support? #733

Closed
skortchmark9 opened this issue Aug 4, 2022 · 2 comments
Closed

Offscreen Canvas Support? #733

skortchmark9 opened this issue Aug 4, 2022 · 2 comments
Labels
question Further information is requested

Comments

@skortchmark9
Copy link

Hey, have you experimented at all with offscreen canvas? I'm trying to draw ~10+ plots * many series and running into some performance issues with Flot. My data is already coming from a worker, so it would be cool if the rendering could as well. I understand dom-based axis labels etc would still need to live on the main thread.

@leeoniya
Copy link
Owner

leeoniya commented Aug 5, 2022

Hey, have you experimented at all with offscreen canvas?

i have not, because only Chromium based browsers support it; Firefox and Safari do not.

not sure how much benefit there would be, but certainly worth checking out. the slowest parts of uPlot that touch canvas are ctx.lineTo(), ctx.fillText(), and ctx.font during resize. i would like to see some perf profile differences of doing a few thousand calls to each of those APIs in a regular and an offsecreen canvas.

and running into some performance issues with Flot

so are you asking theoretically (since Flot and uPlot both use canvas) without trying out your use case in uPlot? or do you have code and data that exhibits this slowness in uPlot that you can share?

@leeoniya
Copy link
Owner

going to close this for now since i think this is a pretty large undertaking, for a feature only available in a single browser engine, without a concrete demo from you that shows ~10+ plots * many series and running into some performance issues with Flot. in Grafana we have many such dashboards and no performance issues related to uPlot speed.

if you'd like to get involved in making some proof of concept code for offscreen canvas comparisons or submit some problematic demos, then i'll be happy to take a look and revisit this in the future.

@leeoniya leeoniya added the question Further information is requested label Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants