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
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Directives with isolated scope are usually not interested in $digest cycles unless one of the scope expressions they specified has changed. Ability to control it would significantly improve performance.
I think this is the same as #5830
However, a similar (the same?) idea called "localApply" was tested here #8055 and found to be too difficult to implement.
@Narretz: the issue you mention is almost the opposite of my suggestion! I'm talking about skipping a scope subtree during $digest, while #5830 proposes to limit $apply.
The implementation is also relatively trivial:
Have a special collection of $$digestWatchers.
These watchers would behave exactly same as "normal" watchers except that if all of them are not dirty, the loop would not run the "normal" watchers neither for that scope, nor for its children.
"local" (internal) $applies will check the same after an internal $digest, whether any of 2-way $$digestWatchers is dirty and call the root's $apply
[I omit detailing of "private" child scopes $apply changes, but they are fairly trivial too]
During DDO $compilation $$digestWatchers will be initialized from the DDO's scope definition.
If I had an assertion, that the contribution would be accepted provided it passes tests/quality standards, I can do it myself (I'm a large mono contributor in the past).
P.S. I'd like also ask you to remove the resolution label.
I've reopened it, but I can't evaluate the feasability of the change. In general, a PR as a more substantial starting point is always good, and perf improvements are always welcome.
Activity
Narretz commentedon Nov 20, 2014
I think this is the same as #5830
However, a similar (the same?) idea called "localApply" was tested here #8055 and found to be too difficult to implement.
kostat commentedon Nov 20, 2014
@Narretz: the issue you mention is almost the opposite of my suggestion! I'm talking about skipping a scope subtree during $digest, while #5830 proposes to limit $apply.
If I had an assertion, that the contribution would be accepted provided it passes tests/quality standards, I can do it myself (I'm a large mono contributor in the past).
P.S. I'd like also ask you to remove the resolution label.
Narretz commentedon Nov 21, 2014
I've reopened it, but I can't evaluate the feasability of the change. In general, a PR as a more substantial starting point is always good, and perf improvements are always welcome.
kostat commentedon Nov 26, 2014
Created a relevant PR: #10221. My tests show reduce of watcher check by x3-x10.
Narretz commentedon Jan 22, 2016
See #10221 (comment)