Though in any case if you have thousands of sparklines in cells I'd question if the display is actually useful to anyone.
Unless it is a large table of data you are presenting in which case thousands of rows has display time issues in my experience anyway. I have in mind a CSV preview on one of our support dashboards which takes a noticeable time to render when given a client import of ~8,000 rows and ~15 columns and that is not a lot more than a plain HTML table.
Of course these tools have different use cases. Handling scaling events and interactivity with Canvas is far, far more laborious.
The great thing about SVG (and to a lesser extent JPEGs) is that you can produce them anywhere, not just in a browser with a JavaScript VM.
Is that true? Isn't canvas a bitmap whereas JPEG requires decoding?
Instead of using svg files, just include them in the html, and make them simple. Each svg sparkline only needs to be two elements (the <svg> tag and one <path>), which is crazy efficient.
Canvas uses one element, instead of two, but you have to create a custom implementation of path rendering and do all that work in JavaScript instead of native browser APIs.
Canvas pulls ahead with drawing complex images where you have a single pixel buffer representing thousands of individual “shapes” because the DOM itself is optimized for interaction, not just drawing pixels, but I think that’s a different use-case from sparklines.
[1] Obviously if you're zooming and transforming and animating layers there is going to be a cost, but that should be compared with doing the same with a canvas.
SVG is a pixel buffer and a set of drawing rudiments to imperatively or declaratively actually make that pixel buffer useful.
The distinction you are drawing between these is sophistry.
I don't even mention the fact that article suggests to return each SVG sparkline in a separate request.
In the end, I think it’s down to the complexity of the graph and the dimensions (in pixels, because images need memory, too).
Says who? Citation?