Closed Bug 952909 Opened 11 years ago Closed 2 years ago

With a very large canvas, getImageData() may hang Firefox

Categories

(Core :: Graphics: Canvas2D, defect)

defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
e10s - ---
firefox107 --- unaffected

People

(Reporter: timdream, Unassigned)

References

Details

(Keywords: perf)

Attachments

(1 file)

Attached file big-image-data.html (deleted) —
Tested on the latest FirefoxNightly on Mac. STR: 1. Go to the attached test case and hit run() Expected: 1. The page prints "Start ... Finished", or maybe, 2. If the process takes too long, the runaway timer should kick in and allow user to abort the script. Actual: 1a. The browser hangs (seemly) indefinitely, and if e10s is enabled, 1b. The tab hangs. Note: 1. The test case creates a very large canvas, draw some text on it, and call getImageData(). 2. It was first reported by :lafncow on https://github.com/timdream/wordcloud2.js/issues/14, and we traceback to the browser bug here. The test case is derived from the library. 3. On Chrome the tab will crash right away, arguably a "better" experience :P. Setting "critical" because the bug will cause user lost all the tabs and only make users to regain them through session restore.
Summary: getImageData() may hang Firefox (or tab if e10s is enabled) → With a very large canvas, getImageData() may hang Firefox (or tab if e10s is enabled)
This bug affects Shumway, too. cwahler created a jsperf test demonstrating the performance problem: http://jsperf.com/cwahlers-getimagedata/2
OS: Mac OS X → All
Hardware: x86 → All
Whiteboard: [shumway:p1]
This perf problem is not e10s-related.
Keywords: perf
Summary: With a very large canvas, getImageData() may hang Firefox (or tab if e10s is enabled) → With a very large canvas, getImageData() may hang Firefox
In the benchmark, the elapsed time for getting/putting a fixed 100x100 bitmap increases as the canvas size increases. We expect that the cost of reading/writing fixed source/destination regions would be constant regardless of the canvas size.
Blocks: 1001069
GFx team requested we move the perf issue to bug 1001069 so we keep the crasher separate.
Whiteboard: [shumway:p1]
No longer blocks: 1001069
Blocks: 1001069

In the process of migrating remaining bugs to the new severity system, the severity for this bug cannot be automatically determined. Please retriage this bug using the new severity system.

Severity: critical → --

Resolving WORKSFORME because the attached test case doesn't hang the browser in 107.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: