Assembly slower in 2002 than in 2005

  • 13 years ago

    We have written a dll in C# in 2002.  We are calling this dll from numerous projects all written in Visual Basic.  Here is where the problem comes in.  The projects written in 2005, the dll is called and is ran in less then 2 seconds I know this because the dll opens a form for our users to log in with.  Unlike the 2005 version a project written in 2003 takes up to 13 seconds to load the same dll.  We have tried this on 3 different machines with several different projects all coming up with the same results.

    Can anyone tell me why this is happening and how to make the projects written in 2002 load the dll as fast as the 2005 projects.

     Thanks in advance,

    Chris.

  • 13 years ago

    This is only a guess because no code, but there might be a few reasons why this is happening:

    1. Some areas of your code are not managed, such as using the Object type, and so boxing is occurring.

    2. There is some performance loss through interoperability between C# and VB.

    3. You are trying to call a COM component through VS2005 which works on a different framework (although this is a VB6 fix, it might work), use the Aximp utility to manually create an interop assembly, and you can then reference the dll in you project.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why.”