Closed Bug 466353 Opened 16 years ago Closed 16 years ago

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

Categories

(Core :: Web Painting, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla1.9.1b3

People

(Reporter: cheetahmorph, Assigned: ventnor.bugzilla)

References

()

Details

(4 keywords, Whiteboard: [fixed by bug 458031])

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.
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?
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.
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
Closed: 16 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
Target Milestone: mozilla1.9.2a1 → mozilla1.9.1b3
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.