jpgjs performance tuning
Merge pull request #4311 from yurydelendik/jpgjs-speed

jpgjs performance tuning