tsayen / dom-to-image

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

Added a cache for responses to fonts #336

Open Nikitozz13 opened 4 years ago

Nikitozz13 commented 4 years ago

Because of many duplicated fonts downloading need to add a cache for them to prevent that. This PR based on @kumarsai solution. On my project it reduced all the responses in several times! So it download the font only once and reuse the response for the further requests to the same font.

Issue: https://github.com/tsayen/dom-to-image/issues/37

InYourHead commented 3 years ago

I merged this PR to my repository and I can confirm that this fix speed up whole operation.

IDisposable commented 1 year ago

This is released in dom-to-image-more 1.12.0