Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bunch of font api calls, it makes performance issue. #136

Open
midhunk7228 opened this issue Apr 25, 2023 · 1 comment
Open

bunch of font api calls, it makes performance issue. #136

midhunk7228 opened this issue Apr 25, 2023 · 1 comment

Comments

@midhunk7228
Copy link

midhunk7228 commented Apr 25, 2023

Use case: description, code

Bunch of font api calls, it makes performance issue. when i call domToImage

const cssToImage = async (parentDiv) => { const scale = 4; const options = { width: parentDiv.clientWidth * scale, height: parentDiv.clientHeight * scale, style: { left: 0, top: 0, right: 0, bottom: 0, transform: "scale(" + scale + ")", transformOrigin: "center center", }, }; parentDiv.querySelector("svg").style.animationName = "none"; console.log(parentDiv.querySelector("svg").style) const dataUrl = await domToImage.toPng(parentDiv, options); return { dataUrl }; };

Actual behavior (stack traces, console logs etc)

Screenshot from 2023-04-26 01-19-59

Library version

"dom-to-image-more": "^2.10.1"

Browsers

Chromium Version 112.0.5615.49

@IDisposable
Copy link
Member

Can we get some more details on the URLs in the "Name" column, or better yet a jsfiddle?
Also, have you tried the cacheBusting option on/off?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants