Hacker News new | ask | show | jobs
by tixzdk 3686 days ago
If possible, send it off to a web worker? That free's up the UI thread

Edit: So it's the rendering that's hard on the CPU. Canvas would probably improve performance. Also, the graphic is so simple and there doesn't seem to be any event listeners on the edges themselves, that converting should be trivial :)

1 comments

Hmm, that sounds like a promising idea...
For the most part you're not doing live animations, statically drawing on a 3 canvases would give you what you want (without huge overhead of DOM nodes and simplicity of 2D canvas painting). Web workers aren't going to do much since most of your lag is coming from way too much DOM (causing layout, repaints to take forever).