|
|
|
|
|
by simonsarris
5317 days ago
|
|
I'm always glad to see more canvas libraries, but the performance of this one is pretty horrendous. I'm writing a comprehensive canvas diagramming library that is now up to 70K lines and its no where near this slow. In case the author reads these comments I'll mention a few I see at first glance: They are doing things like setting the font every on single draw unnecessarily (which takes a surprising amount of time, performance-wise). Actually they are resetting nearly all of the canvas state by hand on each draw, which can just as easily be done in the much faster way by doing "canvas.width = canvas.width". But even that they shouldn't do if they can avoid it. Similarly the author should not set the globalCompositeOperation all the time unless he or she really needs to. I'm sure there are a lot of other low-hanging fruit that can be fixed. I'll try send the author an email later tonight. I hope they keep at it. |
|