gcode-viewer icon indicating copy to clipboard operation
gcode-viewer copied to clipboard

Blocking rendering -> Webworkers?

Open aligator opened this issue 4 years ago • 4 comments

As the rendering blocks the whole js thread currently, maybe I should use webworkers to do this in a non-blocking way.

aligator avatar May 06 '21 11:05 aligator

That’s a great idea !

yvanblanchard avatar Apr 18 '23 13:04 yvanblanchard

@yvanblanchard I looked into it a bit, but I think it would need a bit more refactoring to add this feature. However for now I found another, very simple way to avoid too long blocks:

I now just call setTimeout with 0 all 200 lines while rendering. That way the browser gets a chance to handle its ui updates between rendering.

You can use v0.5.0 to use that feature.

aligator avatar Apr 21 '23 16:04 aligator

Thank you very much for your work! I will test it soon. Let me know when the v0.5.0 will be published.

yvanblanchard avatar Apr 21 '23 16:04 yvanblanchard

NPM is already😃 I just forgot to create a release in Github.

aligator avatar Apr 22 '23 08:04 aligator