Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PLAT-6697] Prevent excess change detection cycles #1861

Merged
merged 8 commits into from
Nov 9, 2022

Conversation

gingerbenw
Copy link
Member

@gingerbenw gingerbenw commented Nov 4, 2022

Goal

Improve performance of angular applications when calling Bugsnag.notify

Design

Leverage built in angular zones to move notify out of unnecessary change detection

Testing

monkey patch the client._notify method to run in zone where applicable, preventing unnecessary change detection cycles

Updating the UI within the onError callback will no longer be considered reliable
@github-actions
Copy link

github-actions bot commented Nov 4, 2022

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 43.66 kB 13.29 kB
After 43.66 kB 13.29 kB
± No change No change

code coverage diff

Coverage values did not change👌.

Total:

Lines Branches Functions Statements
0%(+0%) 0%(+0%) 0%(+0%) 0%(+0%)

Generated by 🚫 dangerJS against bae0faf

@gingerbenw gingerbenw marked this pull request as ready for review November 4, 2022 16:35
Copy link
Contributor

@imjoehaines imjoehaines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, just not sure that the comments are that useful — I've tried to make them a bit clearer for future & link to the docs but feel free to reword them some more if you want

packages/plugin-angular/src/index.ts Outdated Show resolved Hide resolved
packages/plugin-angular/src/index.ts Outdated Show resolved Hide resolved
packages/plugin-angular/src/index.ts Outdated Show resolved Hide resolved
packages/plugin-angular/src/index.ts Outdated Show resolved Hide resolved
Co-authored-by: Joe Haines <hello@joehaines.co.uk>
@gingerbenw gingerbenw changed the base branch from next to integration/v8 November 7, 2022 11:09
packages/plugin-angular/src/index.ts Outdated Show resolved Hide resolved
gingerbenw and others added 3 commits November 8, 2022 09:48
use all arguments when monkey patching

Co-authored-by: Joe Haines <hello@joehaines.co.uk>
@gingerbenw gingerbenw merged commit 6ec6c34 into integration/v8 Nov 9, 2022
@gingerbenw gingerbenw mentioned this pull request Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants