You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kevinpschaaf
changed the title
Add flags to elide property-changed and dom-change events for performance
Add flags to elide events that are strictly unnecessary for downward data-flow
Jan 18, 2017
…4262.
* `Polymer.Settings.suppressTemplateNotifications `- disables `dom-change` and `rendered-item-count` events from `dom-if`, `dom-repeat`, and `don-bind`. Users can opt back into `dom-change` events by setting the `notify-dom-change` attribute (`notifyDomChange: true` property) to `dom-if`/`don-repeat` instances.
* `Polymer.Settings.suppressBindingNotifications` - disables notify effects when propagating data downward via bindings. Generally these are never useful unless users are explicitly doing something like `<my-el foo="{{foo}} on-foo-changed="{{handleFoo}}">` or calling `addEventListener('foo-changed', ...)` on an element where `foo` is bound (we attempted to make this the default some time back but needed to revert it when we found via #3077 that users were indeed doing this). Users that avoid these patterns can enjoy the potentially significant benefit of suppressing unnecessary events during downward data flow by opting into this flag.
Description
There are several cases where Polymer will fire events as a result of downward data flow (as opposed to async/user interaction thereof):
notify: true
eventsdom-repeat
anddom-if
dom-change
eventsdom-repeat
'srenderedCount
notifying property changes as a result of renderThere should be an opt-out from these events to achieve maximum performance.
The text was updated successfully, but these errors were encountered: