Closed Bug 1803643 Opened 1 year ago Closed 1 year ago

Various querySelector micro-optimizations

Categories

(Core :: DOM: CSS Object Model, defect)

defect

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

This helps a bit with bug 1803464, but unfortunately doesn't have the magnitude I would've hoped...

This makes relatively simple changes so that we check lowercase-ness of
local-name selectors first. If so, we don't need to check whether we're
an HTML element in an HTML document, which requires a fair bit of
pointer-chasing.

This removes a few branches and null-checks that I found in profiles.

Depends on D163627

Severity: -- → S3
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7a8e8890780f
Speed up selector matching with already-lowercase local name selectors. r=dholbert
https://hg.mozilla.org/integration/autoland/rev/63b85eeb214b
Speed up dom iteration in querySelector. r=dholbert
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch

== Change summary for alert #36318 (as of Tue, 06 Dec 2022 05:33:57 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
6% perf_reftest_singletons parent-basic-singleton.html linux1804-64-shippable-qr e10s fission stylo webrender 87.97 -> 82.40

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=36318

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

Attachment

General

Created:
Updated:
Size: