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

Route performance problems using updateOnRouterChange #97

Closed
andy-hook opened this issue Jan 10, 2020 · 5 comments
Closed

Route performance problems using updateOnRouterChange #97

andy-hook opened this issue Jan 10, 2020 · 5 comments

Comments

@andy-hook
Copy link
Contributor

andy-hook commented Jan 10, 2020

Versions

  • Angular: 8.2.8
  • Angular CLI: 8.3.6
  • ng-intercom: 8.0.0
  • Node.JS: 10.11.0
  • NPM: 6.4.1

Description

I'm experiencing significant performance problems when changing routes with updateOnRouterChange enabled. In my profiler some of my tasks takes up to 5 or 6 times as long.

Here's an example from clicking between two routes in my app:

updateOnRouterChange: false
image

updateOnRouterChange: true
image

Has anyone come up against these issues before?

@andy-hook
Copy link
Contributor Author

I did some digging and the intercom update function is being called many times due to a subscription matching all router events. Changing this to match for NavigationEnd should fix the issue.

@andy-hook
Copy link
Contributor Author

Hi @scott-wyatt @wbhob – Are you able to publish with this change?

@andy-hook
Copy link
Contributor Author

@scott-wyatt, @wbhob – I hate to be that guy but what's the eta on getting 8.0.1 published to npm?

@scott-wyatt
Copy link
Member

scott-wyatt commented Jan 21, 2020 via email

@andy-hook
Copy link
Contributor Author

Thanks for getting this out! 🎉

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

No branches or pull requests

2 participants