Closed Bug 74309 Opened 19 years ago Closed 19 years ago

9% of the time of color table stresstest spent in allocating style contexts

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Windows 2000
defect
Not set

Tracking

()

VERIFIED FIXED
mozilla0.9.2

People

(Reporter: bratell, Assigned: hyatt)

References

()

Details

I quantified the color table stresstest again and one big offender during the 
layout of that page is allocating of style contexts (StyleContextImpl). Since 
they are always the same size and there will always be need for them during the 
lifetime of the browser, how about allocating chunks of them and reusing them? 

They take 6% of the time now, half a second on my high end machine, and it seems 
to me it wouldn't take very much work to save almost all of that half second.
Another 3% comes from the release of the style contexts so the total cost just 
for allocating/deallocating style contexts are close to 10% of the full display 
time.
Blocks: 54542
Summary: 6% of the time of color table stresstest spent in allocating style contexts → 9% of the time of color table stresstest spent in allocating style contexts
Looks like an interesting warrant for the arena - bug 65266?
I implmented pooling of StyleContext instances (patch is in bug 65266) and could
not measure any significant benefits on the normal set of pages that we run
performance testing against. That said, it didn't get any slower either, so for
nasty cases like the table stresstest that create 10,000 style contexts it might
be measurable.
So, given that there are no side-effects and nobody has expressed any
reservation about the patch, what is stopping it from being checked in?
I agree - check in the patch to bug 65266.
Depends on: 65266
I implemented allocation from the shell's custom arena (with its custom 
recycler code), and I dropped this by nearly 2 seconds.  Taking this bug.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.2
Helping Hyatt take it...
Assignee: attinasi → hyatt
Status: ASSIGNED → NEW
Fixed.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Rubber stamp verification.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
er
Status: REOPENED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → FIXED
no, really
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.