Angular example template without any modification is so slow in production #311

Closed
opened 2025-08-09 17:15:48 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @gyantal on 11/21/2017

Why is the Angular example template without any modification so slow in production?

It takes about 1.06 sec to refresh http://localhost:5000/home on local server.
How can this be a Production quality example?
1 second is too much. For most of the server admins this is not acceptable.
I am using DotNetCore version 2.0.3 on Windows x64.
To reproduce: (just the basic, without any modifications):

"dotnet new angular"
"npm install"
"dotnet restore"
"dotnet run", which says: "Hosting environment: Production"

In Chrome browser, press F12 and go to Network. And Paste http://localhost:5000/home to URL field.
Then hit Refresh sporadically. For getting the "home" or "localhost" document which is 6KB the query time is:

  • 1st Refresh: 2.5 seconds. // Fine. First time the preparations take some time.
  • Hit Refresh very quickly (in every 2-3 seconds): 45msec
  • Hit Refresh while waiting about 5 seconds between Refreshes: 1.06 sec

So, it is 1 second in general for a random user accessing the website with some infrequency. With local webserver! Is it the best we can do?
Could you enlighten me why it is that slow or fix it please?
Thanks.

*Originally created by @gyantal on 11/21/2017* Why is the Angular example template without any modification so slow in production? It takes about 1.06 sec to refresh http://localhost:5000/home on local server. How can this be a Production quality example? 1 second is too much. For most of the server admins this is not acceptable. I am using DotNetCore version 2.0.3 on Windows x64. To reproduce: (just the basic, without any modifications): "dotnet new angular" "npm install" "dotnet restore" "dotnet run", which says: "Hosting environment: Production" In Chrome browser, press F12 and go to Network. And Paste http://localhost:5000/home to URL field. Then hit Refresh sporadically. For getting the "home" or "localhost" document which is 6KB the query time is: - 1st Refresh: 2.5 seconds. // Fine. First time the preparations take some time. - Hit Refresh very quickly (in every 2-3 seconds): 45msec - Hit Refresh while waiting about 5 seconds between Refreshes: 1.06 sec So, it is 1 second in general for a random user accessing the website with some infrequency. With local webserver! Is it the best we can do? Could you enlighten me why it is that slow or fix it please? Thanks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#311
No description provided.