From: Wendell W. <wjw...@ho...> - 2003-12-02 07:34:34
|
> Class Library > > using System; > using FirebirdSql.Data.Firebird; > > public class TestClass > { > public TestClass() > { > } > > public static void RunTest() { > > Code 1. > > } > } > > > Program > > public void myMethod() { > TestClass.RunTest(); > } Have you tried calling TestClass.RunTest() twice, and only timing it the second time? Have you used any other objects in the Class Library .dll to ensure that the .NET Framework has already loaded it? I suspect that the following is happening when you call TestClass.RunTest(): 1) .NET Framework must load your Class Library .dll 2) the Framework looks in TestClass for a static .ctor because the RunTest() is static 3) the Framework detects the FirebirdSql.Data.Firebird.dll assembly dependency and loads it 4) the test actually runs Certainly items 1 and 2 are added when you put the code in the Class Library and they take time Item 3 may be delayed and taking some of the extra time also. Hope this helps, Wendell |