tsayen / dom-to-image

Generates an image from a DOM node using HTML5 canvas
Other
10.32k stars 1.68k forks source link

Performance issue when rendering a Leaflet map with an SVG layer #215

Open ghost opened 6 years ago

ghost commented 6 years ago

Use case: description, code

I have a leaftlet map with an SVG layer. Rendering to an image is very slow, as demonstrated by this jsfiddle

In Firefox I even get the alert message that says the script is slowing down the page and offers to kill it.

Expected behavior

It would be nice if this could complete in a handful of seconds, at least before the browser starts complaining.

Actual behavior (stack traces, console logs etc)

It takes longer than that.

alert-slow

Library version

10-06-2017

Browsers

@