amp-bind: Catch exceptions in mutatedAttributesCallback#8383
Merged
dreamofabear merged 2 commits intoampproject:masterfrom Mar 27, 2017
Merged
amp-bind: Catch exceptions in mutatedAttributesCallback#8383dreamofabear merged 2 commits intoampproject:masterfrom
dreamofabear merged 2 commits intoampproject:masterfrom
Conversation
jridgewell
approved these changes
Mar 24, 2017
kmh287
reviewed
Mar 24, 2017
extensions/amp-bind/0.1/bind-impl.js
Outdated
| const applyPromises = this.boundElements_.map(boundElement => { | ||
| const {element, boundProperties} = boundElement; | ||
|
|
||
| // TODO(choumx): We should avoid triggering a mutation if there are the |
Contributor
There was a problem hiding this comment.
Typo? Also can you give an example (in a reply) of what you mean?
Author
There was a problem hiding this comment.
Oops, fixed typo.
I mean that on a page with 10 bindings and a state mutation only affects one of them, there will be 9 unnecessary measure/mutate passes scheduled that will early-out when checking if the expression result has changed. This seems pretty wasteful.
kmh287
approved these changes
Mar 27, 2017
lironzluf
pushed a commit
to lironzluf/amphtml
that referenced
this pull request
Mar 28, 2017
* master: (34 commits) Prevent amp-carousel next/previous icons fade away on desktop (ampproject#8428) Turn on flag slidescroll-disable-css-snap” (ampproject#8436) Revert "temporarily turn off yarn (ampproject#8356)" (ampproject#8384) initial commit (ampproject#8404) Upgrades for Index Exchange amp-ad tags to report load statistics (ampproject#8054) amp-bind validation tweak (ampproject#8414) Fix an amp-instagram race condition (ampproject#8192) Use whitelist to restrict urlReplacement for scoped analytics element (ampproject#8360) Report active experiments in error logs (ampproject#8108) amp-bind: Catch exceptions in mutatedAttributesCallback (ampproject#8383) Fixing custom scroll-snap on IOS (ampproject#8391) Add experiment for using AmpContext class in integration.js (ampproject#8348) add (ampproject#8349) swipe api (ampproject#8357) skip 3 flaky tests (ampproject#8388) amp-bind: Expression complexity limit (ampproject#8321) add margin-bottom (ampproject#8350) Flying carpet: make container full viewport and center content (ampproject#8292) Service Registration: Document Click (ampproject#7882) Add a8ad (ampproject#8036) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #8137.
mutatedAttributesCallback./to @jridgewell @kmh287