-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Package + Version
- [x ]
@sentry/angular
Version:
5.27.6
Description
The Ajax Request to upload tracing information to Sentry are not done in a runOutsideAngular block. This leads to
- an unneeded ChangeDetection cycle which could hurt performance
- it adds to a delay of 1 seconds (defaultTimeout of tracing) to our E2E Protractor Setup that uses waitForAngular detection (checks to see there are open requests in angular)
Since no interaction with Angular on the result of this request is needed it can be run as if Angular was not there. This can happen in a runOutsideAngular block:
this.ngZone.runOutsideAngular(() => {
setTimeout(() => {
// update component data
// but don't trigger change detection.
});
});