locked
When dll files are loaded ? RRS feed

  • Question


  • After click on exe file when dll fiels are loaded?

    Before or after Application.Run(new Form1()) ?

    I have problem with this because when I click on exe file I have to wait for about 10 second to see window on the screen (I don`t have anything time-consuming in constructor and events handlers: Load, Shown).
    I have about 20 references to dll fiels.


    Regards
    Tuesday, October 28, 2008 4:55 PM

Answers

  • Hi!

    The dll files are not loaded like you'd load a database. They contain compiled (MSIL) code that is executed by the CLR the same way a exe file's code is executed. I don't think that the dll files are the cause of your problem.

    Regards,
    Lucian Baciu, MCTS, http://studentclub.ro/lucians_weblog
    • Marked as answer by kicaj Wednesday, October 29, 2008 6:59 AM
    Tuesday, October 28, 2008 8:40 PM
  • kicaj -- CLR process startup time, among other things, depends on the number of modules (DLLs/EXEs) JIT compiler has to load into memory and the number of Types it needs actually compiled from MSIL to native machine code. It is not uncommon for a graphics app using some extensive library (such as Syncfusion Essential Studio) to manifest some lag during startup.

    If you are really interested in improving your application startup time, I would like to refer you to the following articles: Improving Application Startup Time and Improving Application Startup Performance. These should give you a well-rounded overview of what's going on in the guts of CLR and how to deal with it. What you make of it and whether you'll be able to actually improve your application -- your mileage may vary.
    • Marked as answer by kicaj Wednesday, October 29, 2008 6:59 AM
    • Unmarked as answer by kicaj Wednesday, October 29, 2008 6:59 AM
    • Marked as answer by kicaj Wednesday, October 29, 2008 6:59 AM
    Wednesday, October 29, 2008 2:39 AM
  • Friend..DLL files are loaded by the CLR only when there is a reference to that particular module from your app in runtime...

    That means.. even if you have 100 DLL's referenced by your app, and you simply start the app and stop it without doing anything (so not making any calls to the DLL's), no DLL will be loaded into memory...

    If your app is calling methods in those DLL's in the startup code itself, it can slow down the startup of our app...
    • Marked as answer by kicaj Wednesday, October 29, 2008 6:59 AM
    Wednesday, October 29, 2008 5:24 AM

All replies

  • Hi!

    The dll files are not loaded like you'd load a database. They contain compiled (MSIL) code that is executed by the CLR the same way a exe file's code is executed. I don't think that the dll files are the cause of your problem.

    Regards,
    Lucian Baciu, MCTS, http://studentclub.ro/lucians_weblog
    • Marked as answer by kicaj Wednesday, October 29, 2008 6:59 AM
    Tuesday, October 28, 2008 8:40 PM
  • kicaj -- CLR process startup time, among other things, depends on the number of modules (DLLs/EXEs) JIT compiler has to load into memory and the number of Types it needs actually compiled from MSIL to native machine code. It is not uncommon for a graphics app using some extensive library (such as Syncfusion Essential Studio) to manifest some lag during startup.

    If you are really interested in improving your application startup time, I would like to refer you to the following articles: Improving Application Startup Time and Improving Application Startup Performance. These should give you a well-rounded overview of what's going on in the guts of CLR and how to deal with it. What you make of it and whether you'll be able to actually improve your application -- your mileage may vary.
    • Marked as answer by kicaj Wednesday, October 29, 2008 6:59 AM
    • Unmarked as answer by kicaj Wednesday, October 29, 2008 6:59 AM
    • Marked as answer by kicaj Wednesday, October 29, 2008 6:59 AM
    Wednesday, October 29, 2008 2:39 AM
  • Friend..DLL files are loaded by the CLR only when there is a reference to that particular module from your app in runtime...

    That means.. even if you have 100 DLL's referenced by your app, and you simply start the app and stop it without doing anything (so not making any calls to the DLL's), no DLL will be loaded into memory...

    If your app is calling methods in those DLL's in the startup code itself, it can slow down the startup of our app...
    • Marked as answer by kicaj Wednesday, October 29, 2008 6:59 AM
    Wednesday, October 29, 2008 5:24 AM