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.
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 stoppedgetPixel()
assigning global variables it now takes 120-200ms to process the same frame.