The standard Canvas API is probably your best option. So if some library claims to have better performance than Canvas 2D, I would love to see a benchmark on that. Anyone would assume WebGL is faster, but as you know "assumption is the mother of all fuckups". Let me explain.
A year ago, I had to make a proof of concept for drawing Gantt charts on a Canvas. Coming from a game development background, my assumption was that some things would be too slow on a canvas:
- rotating graphics
- drawing an insane amount of rectangles
- filling surfaces with a certain repeating texture
So I also included a benchmark of Canvas vs WebGL. The conclusion was that for most things, Canvas was faster:
- rotating graphics
- texturizing
- etc.
This really amazed me, because as an old school game developer, I know all limitations of 2D rendering. The thing is, all modern browsers heavily optimize their Canvas to the GPU. Even the older Edge. Do some heavy Canvas 2D drawing, and see your GPU usage spikes.
Plus, rendering text on WebGL is not as straightforward.
However, there was a tipping point when drawing an insane amount of rectangles (which basically become dots), where WebGL would take over.
So for this project, the simplicity of the Canvas API, the text rendering, and the performance were definitely a sure way to use that one instead of a more complex, slower WebGL.
A year ago, I had to make a proof of concept for drawing Gantt charts on a Canvas. Coming from a game development background, my assumption was that some things would be too slow on a canvas:
- rotating graphics
- drawing an insane amount of rectangles
- filling surfaces with a certain repeating texture
So I also included a benchmark of Canvas vs WebGL. The conclusion was that for most things, Canvas was faster:
- rotating graphics
- texturizing
- etc.
This really amazed me, because as an old school game developer, I know all limitations of 2D rendering. The thing is, all modern browsers heavily optimize their Canvas to the GPU. Even the older Edge. Do some heavy Canvas 2D drawing, and see your GPU usage spikes.
Plus, rendering text on WebGL is not as straightforward.
However, there was a tipping point when drawing an insane amount of rectangles (which basically become dots), where WebGL would take over.
So for this project, the simplicity of the Canvas API, the text rendering, and the performance were definitely a sure way to use that one instead of a more complex, slower WebGL.