mapbox / pixelmatch

The smallest, simplest and fastest JavaScript pixel-level image comparison library
ISC License
6.17k stars 307 forks source link

Memory Issue #41

Closed ThunderBoltEngineer closed 6 years ago

ThunderBoltEngineer commented 6 years ago

I am processing 300 DPI gray scale image with resolution of 10800x7200 , and it consumes large memory (> 2GB) and takes long time (> 10 sec).

Is this normal behavior?

mourner commented 6 years ago

I think it's normal. 10800 * 7200 is really huge, Node has a hard time just decoding a PNG like that. Pixelmatch algorithm doesn't do anything special that could slow things down — you can see that in the code.