RESOLVED FIXED 181244
Poor performance with lots of small drawImage() of sprites into canvas
https://bugs.webkit.org/show_bug.cgi?id=181244
Summary Poor performance with lots of small drawImage() of sprites into canvas
Matt Sephton
Reported 2018-01-03 07:32:26 PST
Created attachment 330385 [details] screenshot: safari Summary: I am drawing many small 8x8 tiles onto the canvas. I am seeing poor performance in Safari/TP compared to Chrome. Steps to Reproduce: Go to : http://www.gingerbeardman.com/pangds/ Press the left/right arrows to change display Inspect console for timings. Expected Results: Drawing should be instantaneous. Actual Results: Drawing is very slow. Seems to be CPU/GPU bound as performance varies between computers. MBP 10,2 (early 2013; 3.0 GHz Intel Core i7): Safari 11.0.2 @350ms Safari TP 46 @450ms Chrome @65ms Version: ProductName: Mac OS X ProductVersion: 10.13.2 BuildVersion: 17C88 Safari 11.0.2 (13604.4.7.1.3) Safari TP 46 11.1 (13605.1.18.2) Chrome (63.0.3239.108) <rdar://problem/31834934>
Attachments
screenshot: safari (438.59 KB, image/png)
2018-01-03 07:32 PST, Matt Sephton
no flags
screenshot: safari TP (350.72 KB, image/png)
2018-01-03 07:32 PST, Matt Sephton
no flags
screenshot: chrome (498.06 KB, image/png)
2018-01-03 07:32 PST, Matt Sephton
no flags
Matt Sephton
Comment 1 2018-01-03 07:32:44 PST
Created attachment 330386 [details] screenshot: safari TP
Matt Sephton
Comment 2 2018-01-03 07:32:59 PST
Created attachment 330387 [details] screenshot: chrome
Simon Fraser (smfr)
Comment 3 2018-01-03 22:09:57 PST
Are you drawing from the sprite sheet image into the canvas, or doing a canvas-to-canvas draw?
Tim Horton
Comment 4 2018-01-04 00:04:10 PST
The source is quite straightforward/not minified; it’s Image() to Canvas drawing.
Matt Sephton
Comment 5 2021-09-15 06:05:31 PDT
Interested to spot this again, still a problem in late-2021.
Matt Sephton
Comment 6 2023-03-29 15:53:10 PDT
Sadly just noticed this again in 2023.
Matt Sephton
Comment 7 2023-05-23 09:18:18 PDT
Good News - macOS 12.6.6 - MBP M1 Pro Safari 16.5 = <2ms Chrome 113 = <20ms Closing as resolved.
Note You need to log in before you can comment on or make changes to this bug.