I’ve got a web app solution containing a class library project.
Whenever I rebuild the class library and then refresh the page, it takes ages the first time, and is then quick again subsequently.
It’s almost as if the newly rebuilt dll is having to ‘bed in’ to the app.
Can anyone tell me what’s really going on behind the scenes?
Thanks
David
That’s exactly it. The first time ASP.NET actually loads up an assembly is when it gets JITted. You can move this startup time from the first time the application is used to the time it gets built by including something along these lines as a post-build event in the project:
Check the docs for
aspnet_compilerfor background info and more options.