question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why executeRefreshOutsideAngularZone is deprecated?

See original GitHub issue

We use flag executeRefreshOutsideAngularZone and and our application is much faster

<virtual-scroller
    #scroll 
    [executeRefreshOutsideAngularZone]="true"
    (vsChange)="cd.detectChanges()"
>...
</virtual-scroller>

Why is this property obsolete?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:7

github_iconTop GitHub Comments

2reactions
speigecommented, Jun 20, 2019

I’ve been thinking a lot about this & I’ve decided to keep executeRefreshOutsideAngularZone as an officially supported API.

My initial fear with executeRefreshOutsideAngularZone was because I thought it caused major bugs across my entire app. I didn’t want to deal with tech support if other developers started using the flag. However I recently realized it was actually a bug in my own manual change detection & executeRefreshOutsideAngularZone was not the root cause.

I still believe OnPush is the ideal approach, but it’s also much harder to implement. Although executeRefreshOutsideAngularZone “easier” to implement, I don’t want developers to make the same mistakes with manual change detection that I did. For this reason, I’ve added an explanation to the ReadMe which explains how to do it properly. Hopefully this will minimize any issues related to executeRefreshOutsideAngularZone.

I think executeRefreshOutsideAngularZone is a good initial approach for users to get a quick performance boost before they’re ready to move to full-appp OnPush. Thanks for submitting the initial idea & PR & thanks for helping me to understand it. Sorry I was slow/stubborn 😃

1reaction
nickbullockcommented, Jun 7, 2019

Local branch change detection is cheaper than AppRef.tick even if all of your components have OnPush strategy. I think it is Angular/NgZone code overhead. They failed to make the change detection mechanism from the root of the tree as fast as in React.js. It is still like $scope.digest() vs $rootScope.digest(). This is the only reason this flag is useful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Automated Malware Analysis Report for Updated Invoices.pdf
RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else ... executeRefreshOutsideAngularZone=!1,this.
Read more >
https://raw.githubusercontent.com/rintoj/ngx-virtu...
Removed ChangeEvent (replaced by IPageInfo) * Removed several deprecated properties (ChangeEvent.start, ChangeEvent.end, update/change/start/end events ...
Read more >
Info: 'runZoned' is deprecated and shouldn't be used. This ...
I am getting this issue while trying to run my code on DartPad. 'runZoned' is deprecated and shouldn't be used. This will be...
Read more >
1926579 – Setting .spec.policy is deprecated and will be ...
0-0.ci-2021-02-14-191057]$ oc logs openshift-kube-scheduler-operator-67689944bf-f45bk -n openshift-kube-scheduler-operator | grep "deprecated" W0215 08:49: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found