f57ffc2b57e08265610a
canvas speed tricks
- changing fill properties is expensive. change fill color, opacity, line color, line width as infrequently as possible
- it’s faster to do a lot of
ctx.rect
and then one ctx.fill
than to ctx.fillRect
- always draw to even pixels, for widths and locations. use
~~
to do this.
- use a module like leftpad to write out the files in a way that ffmpeg can understand