Closed Bug 1378005 Opened 2 years ago Closed 2 years ago

stylo: Eliminate the teardown traversal

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: bholley, Assigned: bholley)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Now that bug 1377010 landed, we can avoid traversing the entire tree when tearing down the presshell. This should save us some millseconds during document teardown.

I've got patches that I need to run through try.
MozReview-Commit-ID: BPC6u4sBNPR
Attachment #8883353 - Flags: review?(emilio+bugs)
MozReview-Commit-ID: 76dmk3ip3hv
Attachment #8883354 - Flags: review?(emilio+bugs)
MozReview-Commit-ID: 3B2qV84peCv
Attachment #8883355 - Flags: review?(emilio+bugs)
Comment on attachment 8883353 [details] [diff] [review]
Part 1 - Use GC machinery rather than recursion for post-rule-tree-teardown node dropping. v1

Review of attachment 8883353 [details] [diff] [review]:
-----------------------------------------------------------------

Ugh, that's somewhat nasty... Looks fine. r=me
Attachment #8883353 - Flags: review?(emilio+bugs) → review+
Comment on attachment 8883354 [details] [diff] [review]
Part 2 - Detect prescontext re-initialization and drop any servo data that exists. v1

Review of attachment 8883354 [details] [diff] [review]:
-----------------------------------------------------------------

Do we need to go through all the style roots? (Can there be any other than the root at that point?)
Attachment #8883354 - Flags: review?(emilio+bugs) → review+
Comment on attachment 8883355 [details] [diff] [review]
Part 3 - Stop synchronously clearing serving data on style set teardown. v1

Review of attachment 8883355 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. There's a typo in the commit message, also (s/serving/Servo/, I assume).
Attachment #8883355 - Flags: review?(emilio+bugs) → review+
(In reply to Emilio Cobos Álvarez [:emilio] from comment #7)
> Comment on attachment 8883354 [details] [diff] [review]
> Part 2 - Detect prescontext re-initialization and drop any servo data that
> exists. v1
> 
> Review of attachment 8883354 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Do we need to go through all the style roots? (Can there be any other than
> the root at that point?)

I think we don't need to - the other ones are all NAC, which is gone of the frame tree is gone.

Thanks for the fast reviews!
Pushed by bholley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/28ce699eb74c
Detect prescontext re-initialization and drop any servo data that exists. r=emilio
https://hg.mozilla.org/integration/autoland/rev/2abf534b2d0c
Stop synchronously clearing serving data on style set teardown. r=emilio
https://hg.mozilla.org/mozilla-central/rev/28ce699eb74c
https://hg.mozilla.org/mozilla-central/rev/2abf534b2d0c
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Duplicate of this bug: 1348491
Duplicate of this bug: 1318611
Depends on: 1417561
You need to log in before you can comment on or make changes to this bug.