Last Comment Bug 697502 - Large (1000x1000px) SVG backgrounds are extremely slow to scroll
: Large (1000x1000px) SVG backgrounds are extremely slow to scroll
: perf
Product: Core
Classification: Components
Component: SVG (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Jet Villegas (:jet)
Depends on: 764299
  Show dependency treegraph
Reported: 2011-10-26 11:02 PDT by Atul Varma [:atul]
Modified: 2014-10-04 14:51 PDT (History)
5 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Simple HTML page with DIVs that contain SVGs as backgrounds (379 bytes, text/html)
2011-10-26 11:02 PDT, Atul Varma [:atul]
no flags Details
zip of live example (129.53 KB, application/zip)
2013-05-25 15:11 PDT, Jonathan Watt [:jwatt]
no flags Details

Description Atul Varma [:atul] 2011-10-26 11:02:53 PDT
Created attachment 569727 [details]
Simple HTML page with DIVs that contain SVGs as backgrounds

The following attachment doesn't phase Mobile Safari on an iPhone 4, yet it brings my Macbook Air to a crawl when viewed using the latest Firefox Nightly.
Comment 1 Boris Zbarsky [:bz] (still a bit busy) 2011-10-26 11:50:29 PDT
Hmm.  Seems to work OK here, but on an mbp, not an air.

Would you be willing to use a shark nightly and generate a sample?
Comment 2 Daniel Holbert [:dholbert] 2011-10-26 12:22:01 PDT
(Works fine for me on my Linux desktop, too, but it's got a good bit more power than the Air.)
Comment 3 Robert Longson 2011-10-26 12:57:56 PDT
No problem on Windows either.
Comment 4 Atul Varma [:atul] 2011-10-26 13:28:54 PDT
Sure, where can I get a shark nightly and how do I generate a sample?
Comment 5 Atul Varma [:atul] 2011-10-26 13:30:14 PDT
Oh, I should also mention that just having the page open doesn't slow down my air--it's specifically the act of scrolling w/ a mousewheel that causes lots of stuttering and such. (Most pages scroll just fine with the mouse wheel.)
Comment 6 Daniel Holbert [:dholbert] 2011-10-26 13:55:31 PDT
Yup, I figured that from the bug title -- I was referring to mousewheel scrolling in comment 2.  FWIW, my firefox CPU usage doesn't go over ~20% while I'm scrolling.  (This is true even if I enable the 'general.smoothScroll' pref - still nice and smooth & CPU usage doesn't go over around 20%)
Comment 7 Boris Zbarsky [:bz] (still a bit busy) 2011-10-26 14:32:01 PDT
You can get the latest shark nightly at

As far as generating a sample, the simplest thing to do is to open Activity Monitor, select Nightly in the list, click the "Sample Process" button, and in the next several seconds do a bunch of scrolling over in the Firefox window.  Once the sample has been generated, copy and paste it into a text file and attach the file here.
Comment 8 Jonathan Watt [:jwatt] 2013-05-13 06:33:48 PDT
Hmm, the attachment doesn't work anymore because the:

  <base href="">

isn't being used when resolving the path for the:

  <link rel="stylesheet" href="floors.css">

Was that an intentional change at some point?
Comment 9 Boris Zbarsky [:bz] (still a bit busy) 2013-05-13 06:39:50 PDT
The <base> is in fact being used.  It's just that non-https subresource loads from an https page (like the bugzilla attachment page) are blocked by default in current nightlies.  You can unblock it for one load by clicking the little near-invisible shield icon to the left of the lock icon in your url bar and selecting "Disable Protection on This Page" from the dropdown.
Comment 10 Jonathan Watt [:jwatt] 2013-05-25 15:11:51 PDT
Created attachment 754166 [details]
zip of live example
Comment 11 Jonathan Watt [:jwatt] 2013-05-25 15:12:48 PDT
For what it's worth paint-flashing isn't showing any invalidation issues.

Maybe bug 764299 will make the scrolling a bit smoother.
Comment 12 Jonathan Watt [:jwatt] 2013-10-29 19:44:34 PDT
Atul, since you were the only person who experienced this, can you retest this using latest Nightly, both with with image.mem.surfacecache.max_size_kb set to its default value, and with it set to zero. (To help distinguish between whether bug 764299 helped or not.)
Comment 13 Jonathan Watt [:jwatt] 2014-10-04 14:51:35 PDT
Atul, if you still experience this please do reopen.

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