Recently I struggled for a couple of days with terrible performance when using getImageData - I am using Ubuntu with Firefox 23.
after some googling I found that going to 'about:config' (in your address bar)
find gfx.xrender.enabled and set to false, then restart the browser.
After this instead of taking 2 minutes (yes 2 minutes!) to run the getImageData it took 4 seconds.
more info here:
https://bugzilla.mozilla.org/show_bug.cgi?id=550845&hide_resolved=1