MVC3 virtual directory browsing virtual folder is very slow

I have an MVC3 application that uses views and controllers as usual.

I also have a controller TestControllerthat returns views from a virtual directory installation in IIS 7.5.

Inside IIS, in the Views section, I added a virtual directory Testthat points to a directory on my local drive with my cshtml pages.

Rendering a view takes up to 20 minutes on my first request, but subsequent requests take seconds.

The actual folder on my local computer contains 1000 cshtml pages - will this be a problem?

Why did it take me 20 minutes (first request) to render the view from the virtual directory and seconds to render the view in the solution itself?

Any help is greatly appreciated.

[Further update] - this happened several times, and then simply stopped. Then I had to delete the virtual directory and re-add it to IIS, and it started to happen again.

I decided to launch the ant performance profiler. This is the result (I stopped it after almost 30 minutes of waiting) Ants performance profiler

I have a feeling that we can see a dead end, but I have no idea how to verify this.

+3
source share
1 answer

, , , GetCacheDependency .

, , , , - , :

  • couchbase
  • VirtualPathProvider
  • CacheDependency
  • , CacheDependecy,
  • MSMQ
+1

All Articles