CaliStyle / ng-intercom

Angular 7+ Wrapper for Intercom.com
MIT License
54 stars 46 forks source link

Route performance problems using updateOnRouterChange #97

Closed andy-hook closed 4 years ago

andy-hook commented 4 years ago

Versions

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 commented 4 years ago

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 commented 4 years ago

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

andy-hook commented 4 years ago

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

scott-wyatt commented 4 years ago

Opps! Sorry about that, I thought it published. I’ll publish it to npm this morning

Sent from out and about

On Jan 15, 2020, at 2:50 AM, Andy Hook notifications@github.com wrote:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

andy-hook commented 4 years ago

Thanks for getting this out! 🎉