-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
P2: SoonStaleInactive for one year or moreInactive for one year or moreType: Feature RequestWG: runtime
Description
summary
Currently, amp-bind uses a TreeWalker in order to find bindings on elements. This is an expensive operation. We can significantly speed this up via preprocessing in the AMP Optimizer.
Instead of using the TreeWalker, we could use the optimizer to place the attribute i-amphtml-binding on each element with a binding and use querySelectorAll in the runtime to find them.
todo
- Measure expected perf win: time spent treewalking for light/heavy pages vs. querySelectorAll times for the same pages.
- Implement AMP Optimizer / AMP Cache changes: 🚀 amp-bind: Use querySelectorAll to quickly find all bound elements #32851
- Implement amp-bind changes.: Add amp-bind optimizer amp-toolbox#1147
- Validator changes: ✨ Validator: Enable the i-amphtml-binding attribute for faster amp-bind #32901
cc @ampproject/wg-runtime
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2: SoonStaleInactive for one year or moreInactive for one year or moreType: Feature RequestWG: runtime