3 ms·
Ah, but Canvas does not rely on JS. You would update it using JS, yes. When you don’t update it, it’s just another image. Browsers are quite good at images. In
by fuzzy2 3y ago
Ah, but Canvas does not rely on JS. You would update it using JS, yes. When you don’t update it, it’s just another image. Browsers are quite good at images.
In the end, I think it’s down to the complexity of the graph and the dimensions (in pixels, because images need memory, too).
- thehappypm 3y agoHow do you draw an image on a canvas without JS?
- fuzzy2 3y agoYou don’t. My point is: After drawing, the canvas is “inert”. Rendering to the canvas once is probably more or less as expensive as rendering the SVG once. However, the SVG will probably be rendered a lot more than once. The page developer cannot control it either, the browser decides what’s best.