Closed Bug 2017959 Opened 9 months ago Closed 9 months ago

Reorder the `all` shorthand expansion to improve cache locality of transition diffing

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
149 Branch
Tracking Status
firefox149 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(2 external files)

Something that Denis found while looking at bug 2014110 was that the all shorthand expansion order matters for that benchmark, because it uses tons of transition: all things.

emilio: Really? I did one too and it seemed to help haha
https://perf.compare/subtests-compare-results?baseRev=a86b223c8709baffd780da8ab1080065e0e74427&baseRepo=try&newRev=34caa376b4aca8955e8aeaf30d552aad58348724&newRepo=try&framework=13&baseParentSignature=5351289&newParentSignature=5351289&test_version=student-t&replicates=
denispal: I think I did... But then realized that for the most part it didn't matter because we sort them here, so the LonghandId order ended up being effectively the same...
denispal: oh! we declare all before sorting by variant here... So alright, it could matter in the end

I had looked at the table order, but only looked at LonghandId order, and we do the longhand sorting after declaring all...

Flags: needinfo?(emilio)

When diffing properties to start transitions, it's very common to
iterate over the all shorthand, because it's the default
transition-property.

When this happens, it's better to hit the properties in a way they're
close in memory. This shows up in speedometer, see bug 2014110.

Sort the all longhands by struct order for this.

Assignee: nobody → emilio
Status: NEW → ASSIGNED

Doesn't need code generation, move it close to the
NonCustomPropertyIterator.

Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/be5cfe0a72d5 https://hg.mozilla.org/integration/autoland/rev/4f19bf44e4ef Tweak all shorthand order to be more cache-friendly. r=firefox-style-system-reviewers,dshin https://github.com/mozilla-firefox/firefox/commit/571042b852a4 https://hg.mozilla.org/integration/autoland/rev/a0719d109c2f Move TransitionPropertyIterator off mako. r=firefox-style-system-reviewers,dshin
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch
Blocks: 2018414
QA Whiteboard: [qa-triage-done-c150/b149]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: