-
Notifications
You must be signed in to change notification settings - Fork 2.2k
6.0RC1: canActivate seems to have performance issues #2318
-
Updated to 6.0.0-rc.1, the issue with performance still seems to remain for me.
Here are two preformance profiles I took, the fast one with 5.4.2 and the slow one on 6.0.0-rc.1
profiles.zip
Originally posted by @wSedlacek in #2312 (comment)
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 5 comments
-
Quick thought @wSedlacek, on mobile so I haven’t dug into the traces yet, but I wonder with everything being Dynamically Imported in v6 that’s a detriment to the router.
Can you try eagerly importing Firebase auth in your app module and see if that helps? Just a simple import 'firebase/auth', I might’ve gone a bit overboard on lazy loading everything.
Otherwise I bet it’s zone stuff, as I reimplemented the auth listeners in the guard in v6 rather than leaning on AngularFireAuth, as I wasn’t having luck in ngcc providing both Auth and AuthGuard in the AuthGuardModule. I probably gave up that fight too early.
Beta Was this translation helpful? Give feedback.
All reactions
-
No luck with import 'firebase/auth';
When I get a chance I will see if I can't get get a minimal reproduction on Code Sandbox.
Here is my Angular versioning
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △しろさんかく \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 9.0.0-rc.14
Node: 13.5.0
OS: darwin x64
Angular: 9.0.0-rc.14
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.900.0-rc.14
@angular-devkit/build-angular 0.900.0-rc.14
@angular-devkit/build-optimizer 0.900.0-rc.14
@angular-devkit/core 9.0.0-rc.12
@angular-devkit/schematics 9.0.0-rc.12
@angular/cdk 9.0.0-rc.10
@angular/fire 6.0.0-rc.1
@angular/flex-layout 9.0.0-beta.28
@angular/material 9.0.0-rc.10
@schematics/angular 9.0.0-rc.12
@schematics/update 0.900.0-rc.14
rxjs 6.5.4
typescript 3.7.5
webpack 4.41.5
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Thanks for checking. Was just a quick thought after I closed my computer lid for the night. I’ll dig in tonight / tomorrow.
Beta Was this translation helpful? Give feedback.
All reactions
-
There is something with perfromance here as well, but I have it all over other places where "async" calls eg are on templates. Not sure if it's also angular related.
Beta Was this translation helpful? Give feedback.
All reactions
-
Reproduction:
https://github.com/wSedlacek/angular-fire-6-lag-reproduction
Steps taken to product reproduction in the README.md
You can test with y start -o
If line 18 of app-routing.module is commented out the lag disappears.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1