libgif-js
libgif-js copied to clipboard
Use Uint8Array for more efficient loading of GIF frame data
This change results in an approximately 10x speedup when parsing large GIFs. This is accomplished by using Uint8Array
instead of binary strings, and using block memory allocators to increase memory efficiency/reduce GC load.
Using a basic for
loop instead of pixels.forEach()
to populate the canvas pixeldata also gave a significant performance boost.