Closed Bug 1636357 Opened 5 years ago Closed 5 years ago

Cleanup the cascade iterator.

Categories

(Core :: CSS Parsing and Computation, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: emilio, Assigned: emilio)

Details

Attachments

(2 files)

No description provided.

The current API was pretty awkward as a result of two things:

  • Not being able to create empty iterators for smallbitvec.
  • We used to call the F function multiple times, but turns out that
    collecting the declarations in a SmallVec was a perf win.

So clean this up so that it looks more similar to other APIs. This
needs a smallbitvec patch which is up for review in
https://github.com/servo/smallbitvec/pull/24, but I figured I'd submit
the Gecko patch anyways.

This is a bit more code, but hopefully easier to understand (and also hopefully
easier to optimize).

The motivation for this work is that I plan to investigate rebasing / landing
https://github.com/servo/servo/pull/20151, and I don't want more instantiations
of apply_declarations and such.

This is needed for the next patch.

Severity: -- → S3
Keywords: leave-open
Priority: -- → P3
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1b82eac309f6 Clean up cascade rule iteration. r=nordzilla
Status: NEW → RESOLVED
Closed: 5 years ago
Keywords: leave-open
Resolution: --- → FIXED

Err, wat

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78

== Change summary for alert #25914 (as of Wed, 13 May 2020 03:39:31 GMT) ==

Improvements:

18% perf_reftest style-attr-1.html windows10-64-shippable-qr opt e10s stylo 3.73 -> 3.05
17% perf_reftest style-attr-1.html windows7-32-shippable opt e10s stylo 3.18 -> 2.63
16% perf_reftest style-attr-1.html windows10-64-shippable opt e10s stylo 3.62 -> 3.03
16% perf_reftest_singletons style-attr-1.html windows10-64-shippable-qr opt e10s stylo 3.87 -> 3.26
14% perf_reftest_singletons style-attr-1.html windows7-32-shippable opt e10s stylo 3.27 -> 2.82
13% perf_reftest_singletons style-attr-1.html linux64-shippable opt e10s stylo 3.51 -> 3.05
13% perf_reftest_singletons style-attr-1.html linux64-shippable-qr opt e10s stylo 3.51 -> 3.07
12% perf_reftest style-attr-1.html linux64-shippable opt e10s stylo 3.19 -> 2.80
12% perf_reftest style-attr-1.html linux64-shippable opt e10s stylo 3.24 -> 2.86
5% perf_reftest_singletons link-style-cache-1.html macosx1014-64-shippable opt e10s stylo 1,307.85 -> 1,240.25
4% displaylist_mutate linux64-shippable-qr opt e10s stylo 3,481.40 -> 3,326.76

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=25914

Nice

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: