very high cpu usage
humbleCoder1990 opened this issue · comments
If you have a lot ot data, parse can take some time, because speed is not infinite.
This comment is not really related to this lib, sorry, but why don't you use your Canvas2D context to perform the transform? With fill()
that shouldn't be an issue (strokes would get scaled too though).
Or you could even do
const p1 = new Path2D();
p1.addPath(new Path2D("your long path"), { a: scale, d: scale, e: translateX * scale, f: translateY * scale }));
ctx.fill(p1);
And if you really do parse that many path-data every frame, you might consider storing the resulting Path2D
objects.