none
VB6 with JIT Compiling RRS feed

  • Question

  • We have a VB6 application that accesses a very large .NET class library with interop.  At initialization, the class library must create many of the objects in the system, and we suffer a long startup time because of the JIT compile.  We NGENed the .NET class libarary but this didn't help.  To test, we created a .NET application that uses the same libarary and we do NOT suffer the long startup time.

     

    Is there some reason why a VB6 app cannot take advantage of NGEN?

     

    Thanks!

     

    Tim Patton

    Reynolds and Reynolds

    Monday, May 12, 2008 12:19 PM

Answers

  •  

    Are you sure the startup time is caused by JIT compiling and not for example interop marshaling?

     

    Monday, May 12, 2008 12:34 PM
    Moderator

All replies

  •  

    Are you sure the startup time is caused by JIT compiling and not for example interop marshaling?

     

    Monday, May 12, 2008 12:34 PM
    Moderator
  • We added counters to the performance monitor for # of bytes and methods Jitted and that appears to be where the time is.  we're actually only instantiating one COM object so I doubt that it's the marshalling that's taking the time.

     

    thanks for your reply!

    Monday, May 12, 2008 5:09 PM
  • Timothy Patton,

     

    Thanks for your question and the reply. As is mentioned in your follow up, "it's the marshalling that's taking the time". In my opinion, Mattias Sjögren points out the correct direction of your problem.

     

    I would like to mark Mattias Sjögren's reply as Answered. If you have any further question, please follow up with the specific information related to your problem in order to get clearer help.

     

    In addition, the artciel Interop Marshaling Overview can help you to understand this issue better.

     

    Thanks again for your posts.

    Friday, May 16, 2008 2:56 AM
  • If it was the marshalling, wouldn't I see the delay every time I create the new object?  We only see the delay the FIRST time we create the new object, and we verified that a significant JIT was ocurring.  That still leads me to believe that a JIT is occurring even though we have run NGEN.

    Tuesday, May 20, 2008 12:15 PM