jerch / xterm-addon-image

Image addon for xterm.js
MIT License
51 stars 6 forks source link

use offscreen canvas #44

Open jerch opened 1 year ago

jerch commented 1 year ago

Following MDN Firefox recently added better offscreen canvas support in v105, which might give us the chance to optimize canvas/bitmap construction a lot by offloading heavy things to a worker:

The SAB security issues are still a concern, as its not clear yet, if we can get that working from an inline worker. An explicit worker as done before could work around that, but is even more tricky to correctly set up, which was the reason in the first place to remove the explicit worker. A solution w'o SABs is prolly not worth the trouble, as the messaging eats precious cycles.

Furthermore Safari is still in bad shape regarding offscreen canvas support, which is a showstopper and would create a lot of code duplication. Also we cannot reshape the renderer being worker driven due to that yet. Hmm.