Skip to content

amp-bind: remove the need for treewalking #27590

@samouri

Description

@samouri

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

cc @ampproject/wg-runtime

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions