edi9999 / jsqrcode

[deprecated] Lazarsoft's jsqrcode as a node module, object oriented, and with tests
Apache License 2.0
279 stars 63 forks source link

Ensure getPixel uses only local variables for speed #18

Closed sgoo closed 8 years ago

sgoo commented 8 years ago

After testing on Chrome for Android (50.0.2661.89) on a Nexus 5X I noticed it was taking around 1000-1200ms to process a 240x320 frame. After digging in a bit more it seemed to be time spent in grayscale(). Once I stopped getPixel() assigning global variables it now takes 120-200ms to process the same frame.

edi9999 commented 8 years ago

Great investigation.

Thanks !