The js implementation uses ~15% cpu, and my Elm implementation uses ~90% cpu.
(Cpu stats taken from the Chrome task manager.)
Steps I have taken to improve the performance is to pre-calculate all the lines (this is also done in the js version) in the init function – and I’m using Html.Lazy to prevent unnecessary DOM updates.
I also implemented rendering to svg (can be enabled on line 64), but that is even slower than the canvas tree.
Is there anything that can be done to improve the performance any further of either the canvas or svg tree?