Open
Bug 819489
Opened 11 years ago
Updated 8 months ago
[Shutdown] Style sheet take ~50ms to release during shutdown
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
NEW
People
(Reporter: BenWa, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
Attachments
(1 file)
1.45 KB,
text/plain
|
Details |
Profiles report: http://people.mozilla.com/~bgirard/startup_report/report.html#nsCSSStyleSheet::~nsCSSStyleSheet This currently list 10 shutdown profiles sorted from longest to shortest time spent in nsCSSStyleSheet::~nsCSSStyleSheet recorded on my system. Click on the profile will preview the profile + highlight the function. Looks like a lot of the time is spent in free and related memory management function.
Reporter | ||
Updated•11 years ago
|
Blocks: shutdown-faster
![]() |
||
Comment 1•11 years ago
|
||
This isn't object model stuff; this is basic style system data structures... We've got free() calls for all the rules, their declarations, the selector linked lists (one free per node), the arrays stored in CSSDeclaration, and the various heap-allocated things hanging out in nsCSSValues. :(
Component: DOM: CSS Object Model → Style System (CSS)
Comment 2•11 years ago
|
||
Can we allocate that stuff from arenas? /me takes off the arenas-solve-everything hat
![]() |
||
Comment 3•11 years ago
|
||
We can try. That does get into lifetime + CSSOM + DOM issues a bit. :(
Comment 4•11 years ago
|
||
bug 691216 would also help here.
Reporter | ||
Comment 5•10 years ago
|
||
I have been receiving several profiles lately where there's over 1 second spent in this function. Here's the heavy leaf attach and a profile here: http://people.mozilla.com/~bgirard/cleopatra/?report=e4bd2afaa201f68f1c5ebd934cf5b66e863c2e3b#report=e4bd2afaa201f68f1c5ebd934cf5b66e863c2e3b&search=Style Note the resolution is 10ms
Comment 6•9 years ago
|
||
For what its worth, I've seen large CC pauses caused by the destructor for nsCSSStyleSheet (multiple ms for a single one) in bug 861449, and it was caused entirely by clearing arrays of Rules with thousands of elements. For the CC pauses, this is easy enough to fix by switching over to a runnable that incrementally destroys the arrays, but of course that won't help with shutdown.
Updated•8 months ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•