-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
amp-bind: Binding limits vs. infinite scroll #15519
Comments
Great write up. Few thoughts: |
|
Similar request: #17233 |
This issue hasn't been updated in awhile. @choumx Do you have any updates? |
This issue hasn't been updated in awhile. @choumx Do you have any updates? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Context: #11434 (comment)
amp-bind
's bindings limit will be problematic once infinite scroll or appending "view more" use cases become more prevalent.One of the original reasons why these limits exist is (background) initialization latency for
amp-bind
. If parsing an expression takesO(1ms)
on modest hardware, then 2000 bindings means the AMP page could have up to 2s time-to-interactive (TTI) WRTamp-bind
.For infinite scroll/view more, the incremental markup added per trigger is typically small. So we likely need not worry about TTI. Instead, we should think about the total evaluation time for updating the page with a larger number of bindings when
AMP.setState()
is invoked. Luckily, evaluating expressions are typically much faster than parsing them [1], so perhaps something like the following could work:[1] One issue is that the expression complexity and binding limits are only coarse approximations for
amp-bind
runtime performance. For example, we don't factor in the asymptotic complexity for functions likeconcat()
which are highly dependent on the size of input data.[2] Need to consider the fact that expression parse/evaluation is render-blocking by default in
amp-list
. Parse cost can be mitigated with use ofamp-bind-macro
since the expressions are likely very similar. Definitely feeling more mixed about that change in hindsight./cc @ericlindley-g @aghassemi
The text was updated successfully, but these errors were encountered: