Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

6.0RC1: canActivate seems to have performance issues #2318

jamesdaniels started this conversation in General
Discussion options

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)

You must be logged in to vote

Replies: 5 comments

Comment options

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.

You must be logged in to vote
0 replies
Comment options

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
You must be logged in to vote
0 replies
Comment options

Thanks for checking. Was just a quick thought after I closed my computer lid for the night. I’ll dig in tonight / tomorrow.

You must be logged in to vote
0 replies
Comment options

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.

You must be logged in to vote
0 replies
Comment options

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.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Converted from issue

This discussion was converted from issue #2318 on December 10, 2020 02:51.

AltStyle によって変換されたページ (->オリジナル) /