simple website with -moz-box-shadow uses ~60 megs of ram, and maxes out CPU

VERIFIED FIXED in mozilla1.9.1b3

Status

()

Core
Layout: View Rendering
P2
normal
VERIFIED FIXED
9 years ago
9 years ago

People

(Reporter: Ryan Gooler, Assigned: Michael Ventnor)

Tracking

(4 keywords)

Trunk
mozilla1.9.1b3
hang, perf, regression, verified1.9.1
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.9.1 +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed by bug 458031], URL)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081118 Minefield/3.1b2pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081118 Minefield/3.1b2pre

When loading http://www-cs-students.stanford.edu/~amitp/gameprog.html in minefield, the browser becomes unresponsive. Upon loading the task manager, Firefox is revealed to be using up all of a processor core.

Reproducible: Always

Steps to Reproduce:
1. Go to http://www-cs-students.stanford.edu/~amitp/gameprog.html
2. let page load
3.Laaaaaaaaaaaaaaaaaaaaaaaaaaaaaag
Actual Results:  
Browser becomes very slow until tab containing page is closed

Expected Results:  
Browser is responsive and allows me to read the page
Confirmed on Windows XP, latest trunk.
Regression range: http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2008-07-07+01%3A00%3A00&enddate=2008-07-08+11%3A00%3A00
Maybe caused by Bug 212633 ?
On my Vista computer I see no hang, but vertical scrolling is nearly impossible.
I see also a superfluous horizontal scrollbar, but I think this is a different bug.
Blocks: 212633
Status: UNCONFIRMED → NEW
Component: General → Style System (CSS)
Ever confirmed: true
Keywords: hang, perf, regression
Product: Firefox → Core
QA Contact: general → style-system
Version: unspecified → Trunk
Flags: blocking1.9.1?
(Reporter)

Comment 4

9 years ago
Vertical scrolling was very slow for me, as was changing tabs.
Since entering this:

javascript:void(document.getElementsByTagName("head")[0].innerHTML += "<style type='text/css'>*{-moz-box-shadow: none!important}</style>")

in the URL bar makes things faster for me, blaming -moz-box-shadow seems reasonable.  And the page does use -moz-box-shadow.


Does that make things faster for you as well?
Component: Style System (CSS) → Layout: View Rendering
QA Contact: style-system → layout.view-rendering
Summary: simple website uses ~60 megs of ram, and maxes out CPU → simple website with -moz-box-shadow uses ~60 megs of ram, and maxes out CPU
The problem is almost certainly just that we create a temporary surface for blurring the whole box irrespective of the dirty area. We should optimize box-shadow drawing so that blur computation is restricted to the dirty area. It's a little tricky but not all that hard.
(Reporter)

Comment 7

9 years ago
Yup, that made it nice and zippy.
The work in 458031 should fix this.
Depends on: 458031
Flags: blocking1.9.1? → blocking1.9.1+
Priority: -- → P2
Assignee: nobody → ventnor.bugzilla
Whiteboard: [depends on 458031]
Fixed by checkin for bug 458031.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Whiteboard: [depends on 458031]
This was also an issue on OS X. Now I can verify that the fix on bug 458031 solves the hang. Tested with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20081203 Minefield/3.2a1pre

For now setting the TM to 1.9.2a1. We should adjust when the patch has been landed on 1.9.1 branch.
Status: RESOLVED → VERIFIED
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → mozilla1.9.2a1
Bug 458031 has been checked in to 1.9.1 branch already. marking fixed1.9.1 here too and adjusting TM.
Keywords: fixed1.9.1
Whiteboard: [fixed by bug 458031]
Target Milestone: mozilla1.9.2a1 → mozilla1.9.1b3
Sorry for my last comment. We shouldn't change TM. Branch 1.9.1 and trunk are different nowadays. Setting the keyword is enough.
Target Milestone: mozilla1.9.1b3 → mozilla1.9.2a1
Verified on 1.9.1 with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20081221 Shiretoko/3.1b3pre ID:20081221020430
Keywords: fixed1.9.1 → verified1.9.1
Target Milestone: mozilla1.9.2a1 → mozilla1.9.1b3
You need to log in before you can comment on or make changes to this bug.