Last Comment Bug 698996 - Firefox painfully slow rendering SVG elements
: Firefox painfully slow rendering SVG elements
Status: RESOLVED FIXED
[in-the-wild] [external-report]
: perf
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: All All
: -- normal with 2 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Jet Villegas (:jet)
Mentors:
http://bl.ocks.org/1296930
Depends on: 629200 734079
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-02 00:41 PDT by Daniel Roesler
Modified: 2013-10-29 19:45 PDT (History)
9 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Daniel Roesler 2011-11-02 00:41:57 PDT
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Build ID: 20110928224508

Steps to reproduce:

Perform the SVG rendering benchmark here:

http://bl.ocks.org/1296930





Actual results:

Results:
62.690 sec  -  Firefox 7.0.1 
 3.923 sec  -  Chromium 14.0.835.202



Expected results:

Firefox should not take 16x longer to render the same number of SVG elements.

Others please verify the severe delays in Firefox.
Comment 1 Kevin Brosnan [:kbrosnan] 2011-11-02 00:53:34 PDT
13.243s - Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:10.0a1) Gecko/20111101 Firefox/10.0a1 

I get a time about double on Firefox 7. Checking a current nightly that has some large JS improvements would be good. http://nightly.mozilla.org
Comment 2 Mardeg 2011-11-02 00:58:23 PDT
Related to or a dupe of bug 614564?
Comment 3 Daniel Roesler 2011-11-02 01:09:30 PDT
Just downloaded the nightly for comparison on the same machine (Acer Revo 3700)

Mozilla/5.0 (Ubuntu; X11; Linux x86_64; rv:10.0a1) Gecko/20111028 Firefox/10.0a1

57.413 sec  -  Firefox 10.0a1

Not really that much of an improvement.
Comment 4 Brian Birtles (:birtles) 2011-11-09 20:07:25 PST
This appears to be fixed by bug 629200.
Comment 5 SpeciesX 2012-02-17 07:30:34 PST
after bug 629200 land.

  20 - IE9
  20 - Opera 12 Build 1293: 
 642 - Firefox Nightly
1158 - Chrome 19
Comment 6 Jonathan Watt [:jwatt] 2012-03-22 15:02:26 PDT
The work in bug 734079 has improved on things again by another order of magnitude. Here's what I'm seeing with Mac nightlies...

First, Brian's work on bug 629200. The pre- and post-change nightlies that I tested were:

Pre: cset a853f4017192:
https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2012/02/2012-02-16-03-12-31-mozilla-central/firefox-13.0a1.en-US.mac.dmg

Post: cset 2271cb92cc05:
https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2012/02/2012-02-17-03-12-27-mozilla-central/firefox-13.0a1.en-US.mac.dmg

The testcase time went from ~13.5s to ~0.560s, which is about a 25x speedup.

I then see a slight slowdown to ~0.745s between the following nightlies (I'm not sure what caused that):

cset ee554888d071
https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2012/03/2012-03-20-04-35-30-mozilla-central/firefox-14.0a1.en-US.mac.dmg

cset 9989b866c3a8
https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2012/03/2012-03-20-09-12-59-mozilla-central/firefox-14.0a1.en-US.mac.dmg

My work in bug 734079 came after that, with the before and after nightlies being:

cset 4bdae514b9be
https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2012/03/2012-03-21-03-11-51-mozilla-central/firefox-14.0a1.en-US.mac.dmg

cset 5c13fce74f83
https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2012/03/2012-03-22-03-12-20-mozilla-central/firefox-14.0a1.en-US.mac.dmg

This takes the time from ~0.745s to ~0.068s, which is roughly an 11x speedup.

So overall, with the work in bug 629200 and bug 734079, we've gone from ~13.5s to ~0.068s for this testcase, which is roughly a 200x speed up. :)
Comment 7 Jet Villegas (:jet) 2012-04-03 11:15:45 PDT
I'd like to assert that this is fixed. If a 200x speedup doesn't do it, I don't know what else to do here.
Comment 8 Jeremie Patonnier :Jeremie 2012-04-03 11:38:54 PDT
(In reply to Jet Villegas (:jet) from comment #7)
> I'd like to assert that this is fixed. If a 200x speedup doesn't do it, I
> don't know what else to do here.

Sounds good to me too. 
With the benchmark on the 1st comment :

FF Nightly goes ±57 ms
Opera Next goes ±27 ms (x2 faster than FFN)
Chrome Canary goes ±770 ms (x13.5 slower than FFN)
Comment 9 Jet Villegas (:jet) 2012-04-03 11:48:52 PDT
FIXED per comment 8. Thanks!
Comment 10 Darren Govoni 2012-04-19 14:43:26 PDT
Hi,
  I was told there are new SVG speedups in nightly. I have simple SVG file that has panning and zooming which is "terribly" slow and unusable in firefox. Tested in nightly. Reproducible. In google chrome, it is fast and snappy, but I'd rather come back to firefox for my needs. I can't post the test file publicly, but will send to a dev if you want to see how slow it is. It takes more than a second or two just to pan and zoom...I'm on 64bit linux.

thanks,
Comment 11 Jonathan Watt [:jwatt] 2012-04-19 15:22:10 PDT
Darren, please file a new bug using:

https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=SVG

and attach your testcase using the "Add an attachment" link. Thanks!

Note You need to log in before you can comment on or make changes to this bug.