WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
311672
Skip full-page anchor scan for conservative-only speculation rules
https://bugs.webkit.org/show_bug.cgi?id=311672
Summary
Skip full-page anchor scan for conservative-only speculation rules
Basuke Suzuki
Reported
2026-04-07 13:46:17 PDT
processSpeculationRules() scans ALL links on every style recalculation, performing pattern/selector evaluations per anchor. For conservative rules (eagerness: conservative), the result is only consumed at user interaction time (mousedown/pointerdown/keydown). This is wasted work on pages with many links (e.g. magnifiedsand.com with 934 links). This patch defers matching for conservative-only rules to interaction time in HTMLAnchorElement::defaultEventHandler(), skipping the full-page anchor scan in Document::processSpeculationRules() and HTMLAnchorElement::checkForSpeculationRules() when all rules are conservative.
Attachments
Add attachment
proposed patch, testcase, etc.
Basuke Suzuki
Comment 1
2026-04-07 13:55:25 PDT
<
rdar://problem/173520903
>
Basuke Suzuki
Comment 2
2026-04-07 13:55:40 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/62216
EWS
Comment 3
2026-04-08 19:34:23 PDT
Committed
310814@main
(5cf7b15948ed): <
https://commits.webkit.org/310814@main
> Reviewed commits have been landed. Closing PR #62216 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug