aspnet / Identity

[Archived] ASP.NET Core Identity is the membership system for building ASP.NET Core web applications, including membership, login, and user data. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
1.97k stars 871 forks source link

Asp.Net Core takes too long to run the web application #1977

Closed josejmoran closed 5 years ago

josejmoran commented 5 years ago

When I run the application the build process takes about 45 seconds, the majority of that time is spent on some tasks that do not send any message to the Output window so I have no idea what is going on. The development loop cycle is affected by this. Usually we change a file or two and click run again, so it feels like forever every time. Is there a way to improve this, maybe keeping a list of files modified and just compiling only the changed files? If VS is only compiling the files I have created and having a Core I7 with 16GB of RAM it seems too slow to run the application.

It may be helpful to add some logging messages during the build process that show the time spent in each task so if we have a slow build we can pinpoint the task or tasks delaying the build process as well as providing this log to you guys for a deeper analysis.

Eilon commented 5 years ago

Hi @josejmoran would it be possible for you to share the app on GitHub so we can investigate?

You might be able to enable more diagnostic information by running dotnet build -clp:PerformanceSummary from the command line. That will emit additional timing information about where time is spent.

josejmoran commented 5 years ago

Hi,

I will run the command you sent to take a look. It will be great if a feature is added so we can see it in the output window in VS. If you want to test this issue you just need to create a new project with Identity. It seems that when you have not added any new code after creating the project it runs somewhat faster. It could be better, but is not as slow as when you start adding classes and new code. Based on my observations it seems that the more files it has to build the longer it takes to display the app in the browser. Right now I have run it a couple of times and it takes about 20 seconds. Yesterday it took 45 seconds to run. I did have a lot of programs opened though, but enough memory I think for VS to do its job. So today I ran the app with just VS opened ( 3 instances ). I will run it with just VS open and update my findings. It seems that memory is also involved in the slow build too.

On Sun, Sep 23, 2018 at 11:01 PM Eilon Lipton notifications@github.com wrote:

Hi @josejmoran https://github.com/josejmoran would it be possible for you to share the app on GitHub so we can investigate?

You might be able to enable more diagnostic information by running dotnet build -clp:PerformanceSummary from the command line. That will emit additional timing information about where time is spent.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aspnet/Identity/issues/1977#issuecomment-423868604, or mute the thread https://github.com/notifications/unsubscribe-auth/AAeffERv075zq31BmeINZtTXtJz8X2WRks5ueEr-gaJpZM4W1vFE .

-- Regards,

Jose J. Moran 336-347-8688

josejmoran commented 5 years ago

I tested it again with only VS running and it takes 20 seconds. I repeated it several times and I had like 12GB of memory available. Also I just changed a letter on a View. That is why it may be good to add a new feature to allow for an incremental compilation of sort that only compile the file just changed. It seems that VS is using all 4 cores ( 8 threads). So the horse power is there to have the application running is less time. When I run the app just after I build, when there is no need to build the app, because I just built it, the app is in the browser in just 5 seconds. That is good! It looks like the issue is the build process.

I will also take a look to see if I can get a faster PC to see if that helps

On Mon, Sep 24, 2018 at 10:07 AM Jose Moran josejmoranh@gmail.com wrote:

Hi,

I will run the command you sent to take a look. It will be great if a feature is added so we can see it in the output window in VS. If you want to test this issue you just need to create a new project with Identity. It seems that when you have not added any new code after creating the project it runs somewhat faster. It could be better, but is not as slow as when you start adding classes and new code. Based on my observations it seems that the more files it has to build the longer it takes to display the app in the browser. Right now I have run it a couple of times and it takes about 20 seconds. Yesterday it took 45 seconds to run. I did have a lot of programs opened though, but enough memory I think for VS to do its job. So today I ran the app with just VS opened ( 3 instances ). I will run it with just VS open and update my findings. It seems that memory is also involved in the slow build too.

On Sun, Sep 23, 2018 at 11:01 PM Eilon Lipton notifications@github.com wrote:

Hi @josejmoran https://github.com/josejmoran would it be possible for you to share the app on GitHub so we can investigate?

You might be able to enable more diagnostic information by running dotnet build -clp:PerformanceSummary from the command line. That will emit additional timing information about where time is spent.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aspnet/Identity/issues/1977#issuecomment-423868604, or mute the thread https://github.com/notifications/unsubscribe-auth/AAeffERv075zq31BmeINZtTXtJz8X2WRks5ueEr-gaJpZM4W1vFE .

-- Regards,

Jose J. Moran 336-347-8688

-- Regards,

Jose J. Moran 336-347-8688

blowdart commented 5 years ago

This issue was moved to aspnet/Home#3552