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)
3.37 KB,
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•11 years ago
|
Comment 12•11 years ago
|
||
Comment 13•11 years ago
|
||
Comment 14•11 years ago
|
||
![]() |
Assignee | |
Comment 15•11 years ago
|
||
Comment 16•11 years ago
|
||
Comment 17•11 years ago
|
||
Reporter | ||
Comment 18•11 years ago
|
||
![]() |
Assignee | |
Updated•11 years ago
|
Comment hidden (obsolete) |
![]() |
Assignee | |
Comment 20•11 years ago
|
||
![]() |
Assignee | |
Comment 21•11 years ago
|
||
![]() |
Assignee | |
Comment 22•11 years ago
|
||
Comment 23•11 years ago
|
||
![]() |
Assignee | |
Comment 24•11 years ago
|
||
Comment 25•11 years ago
|
||
![]() |
Assignee | |
Comment 26•11 years ago
|
||
Updated•11 years ago
|
![]() |
Assignee | |
Comment 27•11 years ago
|
||
Comment 28•11 years ago
|
||
![]() |
Assignee | |
Comment 29•11 years ago
|
||
Comment 30•11 years ago
|
||
![]() |
Assignee | |
Comment 31•11 years ago
|
||
Comment 32•11 years ago
|
||
Comment 33•11 years ago
|
||
Comment 34•11 years ago
|
||
![]() |
Assignee | |
Comment 35•11 years ago
|
||
Comment 36•11 years ago
|
||
Updated•10 years ago
|
Updated•10 years ago
|
Updated•10 years ago
|
Comment 37•9 years ago
|
||
Comment 39•4 years ago
|
||
Hi Milan, does this issue still occur in our latest builds ? is it possible that it was fixed in Fx52 ?
Comment 40•4 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
•