You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
I wouldn't expect it to have a 1s delay when deployed fully, for example to Azure or to a full IIS instance. However if you need to track down the exact timings you would need to insert more logging or other instrumentation so you can get the timestamps relating to different parts of the request (e.g., when ASP.NET first starts receiving the request, when it starts making a call to Node for prerendering (if you have that enabled), when Node responds, when it starts serving the response HTML, and when it finishes serving the response HTML).
As it happens, the next version of the Angular template is structured very differently because it's based on Angular CLI. You might want to try out a preview of that version and see how it performs for you.
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:
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.
The text was updated successfully, but these errors were encountered: