gif-encoder
gif-encoder copied to clipboard
Add performance tests
During the development of gifsockets, performance was a major priority. We should embrace performance driven development as a core principle for this repository.
Things to perf:
- Verify using
ByteCapacitorover pushing for every byte is more efficient- Test via both
.read()and.on('data')
- Test via both
- Switch to
ndarrayover typed arrays forNeuQuant
- Reuse of
indexedPixelsinstead of reallocating them for everyanalyzePixels
- Performance of removing alpha channel vs iterating of rgba array (
this.pixels)- https://github.com/twolfson/gif-encoder/blob/0.3.0/README.md#setimagepixelspixels-options
In 0.4.1, we discovered that frame based buffers are required since byte by byte buffers will fall over. This takes care of the first bullet point.