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

Angular Universal NgProgressRouterModule causes ~500 ms delay #277

Open
lukaszzieba opened this issue May 13, 2020 · 2 comments
Open

Angular Universal NgProgressRouterModule causes ~500 ms delay #277

lukaszzieba opened this issue May 13, 2020 · 2 comments

Comments

@lukaszzieba
Copy link

lukaszzieba commented May 13, 2020

Importing module NgProgressRouterModule causes ~500 ms delay while angular runs on server.

Reproduction

Steps to reproduce:

  1. For create new project: ng new ssr-test
  2. For add server side rendering: ng add @nguniversal/express-engine
    (now you can run: npm run build:ssr and npm run serve:ssr to check initial render time, it is ~20 ms.)
  3. Install ngx-progressbar: npm i ngx-progressbar --save
  4. Import modules to app.module:
    • RouterModule.forRoot([])
    • NgProgressModule
    • NgProgressRouterModule
  5. re run npm run build:ssr and npm run serve:ssr (now TTFB is ~500ms.)

Environment

  • "@angualr": ~9.0.7
  • "@nguniversal/express-engine": "^9.0.2",
  • "express": "^4.15.2",
  • "ngx-progressbar": "^6.0.2",
  • Operating System: macOS
@jb-infinitai
Copy link

any action on this? I had to remove the progressbar just for this reason. It was screwing the pagespeed score from 80 to 60 in mobile.

@MurhafSousli
Copy link
Owner

I have no idea why it causes a delay on your end, any help on investigating the issue is appreciated! it is probably something in progress-router.service.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants