473,385 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Replacing a dll in /bin

Is there a way to reduce the overhead of replacing a single dll in the /bin
directory?

I have 125 dlls in bin, but even if i only replace one small DLL it takes
about 1 minute to hit an aspx page afterwards.

Any advice or leads appreciated!

Thanks
May 30 '07 #1
4 2060
I have the same problem, but it doesn't look like it has anything to
do with selectively replacing dlls.

The change in one DLL causes IIS to detect it doesn't have a current
copy of the web application in cache, so it reloads everything - even
if only one dll was changed. I haven't found a way to allieviate
this, and I've experienced it even with Microsoft web applications
such as MSCRM.

I've also found that if the web app is inactive long enough (say
overnight), that the next day the delay is back on first use of the
web app as IIS has to refresh its cache again, which it trashed
because of the inactivity.

The only thing I found that does work a little bit is if the
components of the application are separated into their own IIS
websites, but remain in the same IIS application pool. I've found
that when I change one of the dlls in such a sub-site (which also has
its dlls in its own folder), that it doesn't impact the other parts of
the application. All subsites have the same domain name, however, and
each is assigned its own unique port number (ie mydomain.com:5555,
mydomain.com:8081, etc)

May 30 '07 #2
Thanks Andy, it at least eases the pain to know that others are going through
the same thing. I'll check out the sub-folder solution. Do you know if msft
is doing anything to address this in Orcas / IIS 7? It seems like they made
an effort to fix some of the performance problems like this with bs 2005 SP1.

"Andy" wrote:
I have the same problem, but it doesn't look like it has anything to
do with selectively replacing dlls.

The change in one DLL causes IIS to detect it doesn't have a current
copy of the web application in cache, so it reloads everything - even
if only one dll was changed. I haven't found a way to allieviate
this, and I've experienced it even with Microsoft web applications
such as MSCRM.

I've also found that if the web app is inactive long enough (say
overnight), that the next day the delay is back on first use of the
web app as IIS has to refresh its cache again, which it trashed
because of the inactivity.

The only thing I found that does work a little bit is if the
components of the application are separated into their own IIS
websites, but remain in the same IIS application pool. I've found
that when I change one of the dlls in such a sub-site (which also has
its dlls in its own folder), that it doesn't impact the other parts of
the application. All subsites have the same domain name, however, and
each is assigned its own unique port number (ie mydomain.com:5555,
mydomain.com:8081, etc)

May 30 '07 #3
There's nothing to do. The DLLs are independent libraries of code, and the
application has an unknown number of dependencies upon these DLLs. That is,
for example, you can create DLLs that are dependent upon other DLLs, and app
code which is dependent upon multiple DLLs. Therefore, without parsing the
entire application to detect the entire chain of possible interdependencies,
there is no way to determine which DLLs need to be re-loaded.

For example:

DLL_A depends on DLL_B and DLL_C
DLL_B depends on DLL_C and DLL_D
DLL_C depends on DLL_E
DLL_D depends on DLL_E

Page_A calls code in DLL_A and DLL_D
Page_B calls code in DLL_A and DLL_B and UserControl_A
Page_C calls code in DLL_D and UserControl_A

UserControl_A calls code in DLL_C and contains UserControl_B
UserControl_B calls code in DLL_A and DLL_D

You replace DLL_C. Which code needs to be re-loaded?

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"rjdevereux" <rj********@discussions.microsoft.comwrote in message
news:C1**********************************@microsof t.com...
Thanks Andy, it at least eases the pain to know that others are going
through
the same thing. I'll check out the sub-folder solution. Do you know if
msft
is doing anything to address this in Orcas / IIS 7? It seems like they
made
an effort to fix some of the performance problems like this with bs 2005
SP1.

"Andy" wrote:
>I have the same problem, but it doesn't look like it has anything to
do with selectively replacing dlls.

The change in one DLL causes IIS to detect it doesn't have a current
copy of the web application in cache, so it reloads everything - even
if only one dll was changed. I haven't found a way to allieviate
this, and I've experienced it even with Microsoft web applications
such as MSCRM.

I've also found that if the web app is inactive long enough (say
overnight), that the next day the delay is back on first use of the
web app as IIS has to refresh its cache again, which it trashed
because of the inactivity.

The only thing I found that does work a little bit is if the
components of the application are separated into their own IIS
websites, but remain in the same IIS application pool. I've found
that when I change one of the dlls in such a sub-site (which also has
its dlls in its own folder), that it doesn't impact the other parts of
the application. All subsites have the same domain name, however, and
each is assigned its own unique port number (ie mydomain.com:5555,
mydomain.com:8081, etc)


May 31 '07 #4
That makes sense. And I appreciate the complexity, that could become quite a
complicated dependecy graph. But it still seems like a problem that is
solvable.

In your example wouldn't you only need to check that the new DLL_C satisfies
the dependencies on it from DLL_A, DLL_B, and Usercontrol_A? I beleive you
could build up the dependency graph from the CLR metadata's AssemblyRef
information for the DLLs. I'm not sure how or if you could do that for the
web project's pages and usercontrols. But it seems like when you parse them
for the first time that you could store that dependency information as well.

Thanks

"Kevin Spencer" wrote:
There's nothing to do. The DLLs are independent libraries of code, and the
application has an unknown number of dependencies upon these DLLs. That is,
for example, you can create DLLs that are dependent upon other DLLs, and app
code which is dependent upon multiple DLLs. Therefore, without parsing the
entire application to detect the entire chain of possible interdependencies,
there is no way to determine which DLLs need to be re-loaded.

For example:

DLL_A depends on DLL_B and DLL_C
DLL_B depends on DLL_C and DLL_D
DLL_C depends on DLL_E
DLL_D depends on DLL_E

Page_A calls code in DLL_A and DLL_D
Page_B calls code in DLL_A and DLL_B and UserControl_A
Page_C calls code in DLL_D and UserControl_A

UserControl_A calls code in DLL_C and contains UserControl_B
UserControl_B calls code in DLL_A and DLL_D

You replace DLL_C. Which code needs to be re-loaded?

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"rjdevereux" <rj********@discussions.microsoft.comwrote in message
news:C1**********************************@microsof t.com...
Thanks Andy, it at least eases the pain to know that others are going
through
the same thing. I'll check out the sub-folder solution. Do you know if
msft
is doing anything to address this in Orcas / IIS 7? It seems like they
made
an effort to fix some of the performance problems like this with bs 2005
SP1.

"Andy" wrote:
I have the same problem, but it doesn't look like it has anything to
do with selectively replacing dlls.

The change in one DLL causes IIS to detect it doesn't have a current
copy of the web application in cache, so it reloads everything - even
if only one dll was changed. I haven't found a way to allieviate
this, and I've experienced it even with Microsoft web applications
such as MSCRM.

I've also found that if the web app is inactive long enough (say
overnight), that the next day the delay is back on first use of the
web app as IIS has to refresh its cache again, which it trashed
because of the inactivity.

The only thing I found that does work a little bit is if the
components of the application are separated into their own IIS
websites, but remain in the same IIS application pool. I've found
that when I change one of the dlls in such a sub-site (which also has
its dlls in its own folder), that it doesn't impact the other parts of
the application. All subsites have the same domain name, however, and
each is assigned its own unique port number (ie mydomain.com:5555,
mydomain.com:8081, etc)



May 31 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rutger Claes | last post by:
How do I stop the SAX parser from replacing entities such as &#xE3; and &#xA9;. When I use &gt; and a default_handler, the default_handler is called and I can just print the data. Entities as &#xA9;...
3
by: John Livermore | last post by:
From javascript in IE, I have a need to hijack the onclick event for an element and replace it dynamically with my own. I have tried the following... control.onclick = 'myHandler();'; but...
7
by: Rob Meade | last post by:
Hi all, Been a long time since I've been here... /me waves to all.. Ok - my conundrum.. I have a form where a user can enter text and BB codes...for example:
3
by: dornick | last post by:
So I want to do the above, and I really, REALLY don't want to rewrite the entire file. I've been working on it for a while now, and can't for the life of me get it functioning. Basically, I want...
2
by: thehuby | last post by:
Isn't inserting good data and getting it out of a db a pain in the a$$? I am going to be using the Markdown text to HTML parser (http://daringfireball.net/projects/markdown/dingus) for creating...
12
by: anonymous | last post by:
Hello, I need to replace this char  with another char. However I am not able to acieve this. I tried this but it doesnt work: str = str.Replace(chr(asc(194)), "") Can somebody help ?
2
by: Alain | last post by:
Hi, I am working on a project where I need to convert international characters with acii values. Like André -> andre and Björn -> bjorn. How can I do this without replacing every single...
2
by: James Fifth | last post by:
Hello and God Bless, I am stumped trying to get a simple xml database replacing certain data with other data programmatically. This is what my xml looks like. ...
0
by: Lakhi | last post by:
hi frnds, I need small help in String replacement I need to replace the text using replceAll() with Case-Insensitve . Is there any regular expression for this? i have this expression ...
1
by: patelgaurav85 | last post by:
Hi, I want to convert xml in one format into another xml format shown below Input xml : <Name> <Name1> <Name11>Name11</Name11> <Name12>Name12</Name12>
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.