Closed Bug 805210 Opened 12 years ago Closed 8 years ago

Performance regression between FX13 and 14 on a page manipulating canvas ImageData

Categories

(Core :: General, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: quiche_on_a_leash, Unassigned)

References

Details

(Keywords: perf, regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
Build ID: 20121010144125

Steps to reproduce:

Firstly I must apologise for not filling this sooner. :(

The page in question is: 
http://qoal.x10.mx/somethings/comiccreator.html

Part of the script on this page generates a blurred shadow.

On page load, or when moving/changing the speech bubble the shadow is re-rendered.
(You can hover over the tail of the arrow and click and drag if, as I'm doing)

The script is extremely snappy prior to 14 (just tested 12, 13 & 14)


Actual results:

There is very noticeable pause.


Expected results:

The shadow should be rendered almost instantly.
Can you retry this on latest release (16.0.1) and possibly nightly[1]. Looks snappy here (though i'm on linux so might not be a good match).

[1] http://nightly.mozilla.org/
Flags: needinfo?(quiche_on_a_leash)
Attached file Striped down blurring
I've attached a striped down version that just blurs a rectangle.
It prints to the console each time the shadow is rendered. (which is onload and onclick)

With 12 and 13, it takes about ~77ms to complete.
14 takes ~1000ms
Current stable (16) takes ~800ms
Nightly (2012-10-25) takes ~370ms (Though still is up in the 800s for the actual webpage, so I must have optimised something out.)
Flags: needinfo?(quiche_on_a_leash)
Attachment #675129 - Attachment mime type: text/plain → text/html
(very low sample rates < 20)

2011-05-22  6.0: 165
2012-01-30 12.0:  80
2012-03-01 13.0:  77
2012-03-09 13.0:  79
2012-03-13 13.0:  80
2012-03-15 14.0:  83
2012-03-16 14.0:  80
2012-03-17 14.0: 590
2012-04-02 14.0: 720
2012-06-05 16.0: 712

Last good nightly: 2012-03-16
First bad nightly: 2012-03-17

Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=e5f6caa40409&tochange=ecaad3ae9964
The testcase manipulates objects returned from getImageData(), so I'm guessing it's related to bug 550309, CCing Ms2ger.
Component: Untriaged → General
Keywords: perf, regression
Product: Firefox → Core
Summary: Javascript regression between FX13 and 14 → Performance regression between FX13 and 14 on a page manipulating canvas ImageData
Version: unspecified → Trunk
Yeah, totally. You can probably improve performance by caching imageData.data/width/height outside loops.
Blocks: 550309
Indeed.  This should be faster in Firefox 19, and faster yet once we get closer to fixing bug 746773.
Depends on: 746773
It might be good to have a testcase that more closely approximates the actual page.

But that said the testcase tries as hard as it can to be slow (just the out of range reads on typed arrays are terrible!).
Depends on: 829896
Hi QOAL,

I have tested your issue on latest FF release (46.0.1) and latest Nightly build and could not reproduce it. I have used the link from comment 0 and the shadow is rendered on mouse release with no delays. The attachment from comment 2 is printing to the console 50-60 ms on each shadow render.

Is this still reproducible on your end ? If yes, can you please retest this using latest FF release and latest Nightly build (https://nightly.mozilla.org/) and report back the results ? When doing this, please use a new clean Firefox profile, maybe even safe mode, to eliminate custom settings as a possible cause (https://goo.gl/PNe90E).

Thanks,
Paul.
Flags: needinfo?(quiche_on_a_leash)
Hi Paul,

I've just tested this again with the current release and latest nightly build.
Whilst I no longer have the pc I used at the time of reporting this, I'm getting between 25-30 ms for the attached case.

This issue seems fixed for me.

Regards,
QOAL
Flags: needinfo?(quiche_on_a_leash)
Based on Comment 9 from the reporter, changing status to RESOLVED WORKS FOR ME.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: