Closed
Bug 1367209
Opened 7 years ago
Closed 7 years ago
nsCounterManager::DestroyNodesFor does an unconditional hashtable iteration on every frame destruction
Categories
(Core :: Layout, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: MatsPalmgren_bugz)
References
Details
(Keywords: perf)
Attachments
(5 files)
14.07 KB,
patch
|
jfkthame
:
review+
|
Details | Diff | Splinter Review |
4.95 KB,
patch
|
Details | Diff | Splinter Review | |
1.53 KB,
patch
|
jfkthame
:
review+
|
Details | Diff | Splinter Review |
4.65 KB,
patch
|
jfkthame
:
review+
|
Details | Diff | Splinter Review |
1.15 KB,
patch
|
jfkthame
:
review+
|
Details | Diff | Splinter Review |
It's called from nsCSSFrameConstructor::NotifyDestroyingFrame. We should consider having a flag on the frame that says that it _might_ be found in the counter manager.
Reporter | ||
Comment 1•7 years ago
|
||
Note that the call to nsGenConList::DestroyNodesFor in nsCSSFrameConstructor::NotifyDestroyingFrame is already guarded on a flag.
Reporter | ||
Updated•7 years ago
|
Whiteboard: [qf]
Updated•7 years ago
|
Whiteboard: [qf] → [qf:p1]
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → mats
Assignee | ||
Comment 2•7 years ago
|
||
This file is a mess of different indentation and coding styles, let's just fix that once and for all.
Attachment #8874196 -
Flags: review?(jfkthame)
Assignee | ||
Comment 3•7 years ago
|
||
Assignee | ||
Comment 4•7 years ago
|
||
Attachment #8874198 -
Flags: review?(jfkthame)
Assignee | ||
Comment 5•7 years ago
|
||
This uses up the last remaining global frame bit, but I have patches to convert some private bits to global to compensate for this.
Attachment #8874199 -
Flags: review?(jfkthame)
Assignee | ||
Comment 6•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=9ed9078e762e41d09eb1d933bb4058e90d4ce8ad
Attachment #8874200 -
Flags: review?(jfkthame)
Comment 7•7 years ago
|
||
(In reply to Mats Palmgren (:mats) from comment #5) > This uses up the last remaining global frame bit, but I have patches > to convert some private bits to global to compensate for this. I'm guessing you probably meant to say "convert some global bits to private" here.
Updated•7 years ago
|
Attachment #8874196 -
Flags: review?(jfkthame) → review+
Updated•7 years ago
|
Attachment #8874198 -
Flags: review?(jfkthame) → review+
Updated•7 years ago
|
Attachment #8874199 -
Flags: review?(jfkthame) → review+
Updated•7 years ago
|
Attachment #8874200 -
Flags: review?(jfkthame) → review+
Assignee | ||
Comment 8•7 years ago
|
||
> I'm guessing you probably meant to say "convert some global bits to private" here.
No, I intend to move some of the private bits for "Block" and "Text" groups (which
are currently full) to bool:1 on their respective classes instead. This makes two
bits in the private range unused, so they can be reclaimed as global bits instead.
I intend to convert more eventually, because I think it's a more efficient use of
the frame bits; currently there are many frame types that use none or only a few
of the reserved private bits. I'll post the patches later...
Comment 9•7 years ago
|
||
Ah, I see. Yes, that makes sense.
Comment 10•7 years ago
|
||
Pushed by mpalmgren@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/1005b7702f1e part 1 - Fix some indentation and code style issues. r=jfkthame https://hg.mozilla.org/integration/mozilla-inbound/rev/fbfa99d9a737 part 2 - Remove a useless constructor. r=jfkthame https://hg.mozilla.org/integration/mozilla-inbound/rev/1b9d1468f7b4 part 3 - Add a generic frame state bit, NS_FRAME_HAS_CSS_COUNTERS, to indicate that a frame maybe has some counter styles and thus be known by nsCounterManager. r=jfkthame https://hg.mozilla.org/integration/mozilla-inbound/rev/22108a33acd5 part 4 - Use LookupForAdd to avoid an additional hashtable lookup when inserting a new entry. r=jfkthame
Assignee | ||
Updated•7 years ago
|
Flags: in-testsuite-
Assignee | ||
Updated•7 years ago
|
Comment 11•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1005b7702f1e https://hg.mozilla.org/mozilla-central/rev/fbfa99d9a737 https://hg.mozilla.org/mozilla-central/rev/1b9d1468f7b4 https://hg.mozilla.org/mozilla-central/rev/22108a33acd5
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Reporter | ||
Comment 12•7 years ago
|
||
Note that frames have free bool:1 bits as well. See mMayHaveRoundedCorners and the following comment about there being space for 15 more bool:1 there.
Updated•2 years ago
|
Performance Impact: --- → P1
Whiteboard: [qf:p1]
You need to log in
before you can comment on or make changes to this bug.
Description
•