html2canvas icon indicating copy to clipboard operation
html2canvas copied to clipboard

Supporting Atomic Update / Storing Element Instructions

Open Awendel opened this issue 2 years ago • 0 comments

When passing on a large / deep NodeTree, this library can take some time to render it to Canvas (sometimes several seconds).

What would be good though is the ability to make the rendering of the HTML elements more atomic to support faster updates.

Say I know I want to render 100 Elements to Canvas. And 1 Element changed and I want to just "repaint" that one Element without re-rendering all the others.

It would be henceforth good to have some sort of API that translates a given (sub) Element into the respective CanvasContext Calls or just expose some lower level API that works around the children etc.

Use case would be something like a "preview map" of content, similar to the VSCode Minimap, that when a line is changed, would be incredibly inefficient to re-render everything.

Awendel avatar Apr 27 '22 09:04 Awendel