Assembly takes unusually long time to load on one machine

  • Thread starter Thread starter Stephen Walch
  • Start date Start date
S

Stephen Walch

We have built an assembly that works great on dozens of machines, but on one
particular machine is takes a LONG time to load (15+ seconds). The delay
occurs the first time the client code instantiates one of our classes for
the first time. The assembly is a managed C++ project that makes use of
various unmanaged 3rd party libraries, but (from watching the output window)
the assembly loads from the GAC and all the necessary DLLs are loaded from
the file system BEFORE the big delay occurs. During this delay, there
appears to be a lot of network traffic, but that may be misleading. Any
ideas as to why this may be happening?

Thanks in advance. -Steve
 
Hi Steve,

Thanks for posting in the community.
We have built an assembly that works great on dozens of machines, but on one
particular machine is takes a LONG time to load (15+ seconds).

I think there might be some different software configuration in the
particular machine, however I really have no such experience before, maybe
the other community member can help you on it.


Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 
So what kind of software configuration could account for this. Something in
the assembly loader? JIT compilation? Verification of credentials?
 
Hi Stephen,

Thanks for your quickly reply!
So what kind of software configuration could account for this. Something in
the assembly loader? JIT compilation? Verification of credentials?

Since I am not very clear about your system's detail configuration, so how
about compare your problematic machine's system config with the other well
ones.

BTW, to isolate your problem exactly, I suggest you can:
1. Shut dowm all the Windows Services and applications on the machine, to
check whether the services or the other apps matter the assembly loading.

2. Add the some log and trace code to your assembly, to locate which step
of the initialization takes too much time.

3. Build you assembly to native code, then run it on that machine, to
check does the machine's CLR have something wrong.


Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 
Hi Stephen,

How about the problem now?

Do you find the exactly cause to the big delay of the assembly's loading?


Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 
Well, we narrowed it down to a third party license validation product that
gets called in the constructor. We never fixed it, but decided to remove
the product from our system completely and replace it with our own home-made
one. Might have had something to do with attempting to access isolated
storage, but that is just a guess.
 
Hi Stephen,

Thanks for your update!

I am delight to know you found a possible problem bug, wish you have a good
luck!


Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 
Back
Top