-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
It depends what are you doing. like:
That will take only the raw performance of toBlob with no fabricjs code involved. I see from your flamegraph you were also using cache there and that is fine, but we know for things like toBlob we have like do cache optimizations yet because the cache is lost by default in that case |
Beta Was this translation helpful? Give feedback.
It depends what are you doing.
If you just want to copy the current canvas in a blob, you can try to avoid the fabricJS render cycle and just copy it.
toBlob will take a fabricJS canvas data and produce a new image, going through the rendering.
If you already have that data displayed in a canvas on the screen at the right resolution you can grab the canvas element and run toBlob from there.
like:
That will take only the raw performance of toBlob with no fabricjs code involved.
I see from your flamegraph you were also using cache there and that is fine, but we know for things like toBlob we have like do cache optimizations yet because the cache is lost …