TimeChart icon indicating copy to clipboard operation
TimeChart copied to clipboard

OffscreenCanvas Support

Open ierturk opened this issue 3 years ago • 2 comments

Hi, Thanks for works. There is no documentation or demo on OffscreenCanvas option. Does the library support OffscreenCanvas?

Regards, Ibrahim

ierturk avatar May 15 '21 02:05 ierturk

Hi, I have not used OffscreenCanvas. What is your intended use case?

This library only uses canvas to draw the performance-critical part. The axis, legend and some other elements are rendered with SVG. So it may be hard to render everything offscreen with OffscreenCanvas.

huww98 avatar May 15 '21 07:05 huww98

Hi @huww98, Thanks for prompt reply.

In our case, we are trying to plot a data @ ~38.4k. We are using webworkers threads to retrieve data from the server. I think it is good to render graphs within webworker without blocking main thread. However as you said, when the SVG is used to render some part of the graph, it is not possible to use OffscreenCanvas. So we have to render graphs in main thread and employ some other optimizations.

So far I tried the demos and it works within our projects. I'll let you know about the performance of the library within main thread after we try to plot our real time data.

Thanks and regards, Ibrahim

ierturk avatar May 15 '21 11:05 ierturk