Slow getImageData() and putImageData() performance as canvas size increases.
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
People
(Reporter: bugs, Assigned: chiajung)
References
Details
(Keywords: perf, Whiteboard: [shumway:p1])
Attachments
(1 file, 3 obsolete files)
(deleted),
patch
|
Details | Diff | Splinter Review |
Comment 1•11 years ago
|
||
Comment 2•11 years ago
|
||
Comment 3•11 years ago
|
||
Comment 4•11 years ago
|
||
Comment 5•11 years ago
|
||
Comment 6•11 years ago
|
||
Comment 7•11 years ago
|
||
Comment 8•11 years ago
|
||
Assignee | ||
Comment 9•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Assignee | ||
Comment 10•11 years ago
|
||
Comment 11•11 years ago
|
||
Updated•10 years ago
|
Comment 12•10 years ago
|
||
Comment 13•10 years ago
|
||
Comment 14•10 years ago
|
||
Assignee | ||
Comment 15•10 years ago
|
||
Comment 16•10 years ago
|
||
Comment 17•10 years ago
|
||
Reporter | ||
Comment 18•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Comment hidden (obsolete) |
Assignee | ||
Comment 20•10 years ago
|
||
Assignee | ||
Comment 21•10 years ago
|
||
Assignee | ||
Comment 22•10 years ago
|
||
Comment 23•10 years ago
|
||
Assignee | ||
Comment 24•10 years ago
|
||
Comment 25•10 years ago
|
||
Assignee | ||
Comment 26•10 years ago
|
||
Updated•10 years ago
|
Assignee | ||
Comment 27•10 years ago
|
||
Comment 28•10 years ago
|
||
Assignee | ||
Comment 29•10 years ago
|
||
Comment 30•10 years ago
|
||
Assignee | ||
Comment 31•10 years ago
|
||
Comment 32•10 years ago
|
||
Comment 33•10 years ago
|
||
Comment 34•10 years ago
|
||
Assignee | ||
Comment 35•10 years ago
|
||
Comment 36•10 years ago
|
||
Updated•9 years ago
|
Updated•9 years ago
|
Updated•9 years ago
|
Comment 37•8 years ago
|
||
Comment 39•3 years ago
|
||
Hi Milan, does this issue still occur in our latest builds ? is it possible that it was fixed in Fx52 ?
Comment 40•3 years ago
|
||
The original testcase seems offline at the moment, but there's a snapshot here: https://web.archive.org/web/20140415030917/https://jsperf.com/cwahlers-getimagedata/2
It looks like the problem is that getImageData is called before anything was drawn to the canvas. At larger canvas sizes, this means that the backing buffer is re-created and then discarded for every call to getImageData. That explains why the canvas size changes the performance.
I also looked at the code and it looks like we correctly only unpremultiply / premultiply the sub-area of the canvas that is specified by the get/putImageData arguments.
I'll resolve this as WORKSFORME. The original Shumway use case (with a scratch buffer) is no longer present.
Description
•