Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / May 2006

Tip: Looking for answers? Try searching our database.

Performance trouble with assemblies!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hans - 19 May 2006 10:07 GMT
Hi!

I have two C# assemblies (dll) and one desktop testprogram (also C#) and
when I start my testprogram and press the button that will use methods in my
two assemblies it goes really slow the first time. I thought this had to do
with the JIT. The strange thing is that if I start my testapp and press the
button once it goes slow. If I press the button once again it goes pretty
fast  but if I let the application stand for an hour or so and then press
the button it will once again be slow. I thought that once the assembly is
JIT:ed it will be cached at least until my testprogram quits?

My assemblies are not put in the GAC since the assemblies are not shared by
other programs. However I tryed to put the assemblies in the GAC using
gacutil and used Ngen to create a native image. This did not improve any
performance for me.

Can someone shed some light why it goes slow? Is there anything I can do to
prevent this (I thought Ngen was the solution but it does not seem to
improve performance for me). My real application is actually a Win32 Delphi
app that will call my assemblies using com interop but I have the same
problems in my C# testprogram as well. I was thinking of starting a thread
in my win32 program that in the background will "warm up" my assemblies (is
Assembly.load a working way to precompile an entire assembly? I guess that
is not possible to use directly from a win32 application so I guess I will
have to wrap that into another assembly and use com to launch this assembly
that in turn will use Assembly.load on my other two assemblies?).

I'm using .NET Framework v1.1.4322.

Regards
/Hans
Tasos Vogiatzoglou - 19 May 2006 11:31 GMT
Ngen wont give you a performance benefit most of the times.

I assume that the initial delay is the time taken from the referenced
assemblies to load.

If the delay is unacceptable you can make your components
ServicedComponents and rely on pooling and JIT services.

Regards,
Tasos

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.