IIS 7.5 doesn’t cache 3rd party dll on recycle

dlliisiis-7.5performance

I have a really annoying problem.
I have an application (.net 3.5) running within IIS7.5.
Normally when I recycle an application it takes some time the first time you surf to the application. I'm used to this behaviour so I don't mind. I think that IIS then caches the dll's needed within the application, no?
Well I have one application that runs on IIS7.5 that doesn't show this behaviour. In fact when I recycle my application the first page loads really really fast (less than a second). So does every page in the application, except for one.
After some research (about 2 days) I've found that it is due to one particulary 3rd party dll that appearantly doesn't get cached on the first load of the application.
So the first time I surf to this particulary page that dll (17 mb big) is loaded, which off course takes some time (the time usually needed on first load). After this first time that page is going really fast, it's really the loading of that dll that causes the performance issue.

How can I make IIS 7.5 load all my dll's on application start?

I hope I explained it well.

To know:

  • Windows server 2008 (64 bit)
  • IIS 7.5
  • .NET 3.5
  • Virtual environment

Cheers,
M.

Best Answer

.NET loads dll's (or assemblies as they are more usually know) lazily. Only when something that needs an assembly is about to be executed will the assembly be loaded.

Thus if the assembly is never needed, because nothing that uses it is called, it never needs to be loaded.