bugsnag-js icon indicating copy to clipboard operation
bugsnag-js copied to clipboard

perf(plugin-angular): do not run change detections when notifying the event

Open arturovt opened this issue 4 years ago • 3 comments

Angular runs 10 change detection cycles if the notify() method is called within the Angular zone. This drastically affects the performance since we actually shouldn't run those change detections when notifying error events.

This PR adds an ability to avoid running unwanted change detections when notifying the event.

arturovt avatar May 29 '21 20:05 arturovt

Hey @arturovt thanks for the PR, we'll review as priorities allow :)

xljones avatar Jun 02 '21 11:06 xljones

@xander-jones friendly ping :)

arturovt avatar Oct 12 '21 18:10 arturovt

Hi @arturovt

This is still on our radar but when we reviewed your PR the conclusion was that we wouldn't be able to accept it for the time being. We're considering an alternative implementation which would cover handled as well as unhandled events. We'd also need to treat this as a breaking change in case we have any customers relying on aspects of the existing behavior so we're looking to address this as part of our next major release. Thanks again for the contribution and we'll post on this thread with any updates.

mattdyoung avatar Oct 15 '21 10:10 mattdyoung