Announcement

Collapse
No announcement yet.

DLL Load Times

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DLL Load Times

    I ran into an interesting article about DLL loading / binding methods. I'm not sure if this relates to PowerBASIC as Bob is taking care of all the dirty work for us.

    http://msdn.microsoft.com/msdnmag/is...d/Hood0500.asp

  • #2
    Bob has previously stated that this has little or no effect at all, and certainly not worth worrying about unless you wanted to dynamically load and free DLL's iver and over again in your application - this would be an unusual app design to say the least!


    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      I read the info on the URL you posted and the percent increase in loading speed achieved by the optimizations mentioned were amazingly very small (8% to 18% I think).

      The article mentioned loading a bunch of dlls in 1/50 of a second, so I don't think any optimizations for DLL loading are even warranted.

      The bottom line:

      DLLs load so fast normally, that optimization really won't make a big difference


      ------------------
      Chris Boss
      Computer Workshop
      Developer of "EZGUI"
      http://cwsof.com
      http://twitter.com/EZGUIProGuy

      Comment


      • #4
        Matt Pietrek's work has always been very good and this article is
        no exception. What perhaps has not been mentioned in this posting
        is the difference in PowerBASIC DLLs with an alignment that increments
        the size of the DLL by 512 byte steps as against the 16k alignment
        of normal C++ DLL linked with the VC 6 linker. The alignment of
        PowerBASIC EXE & DLL files is equivelent to using the VC 6 linker
        with the option /align:4096.

        Rebasing can be done with the standard tools from VC 6 but it comes at
        a price that it only works correctly on a specific operating system
        so that if you rebase a DLL to work on your development box correctly,
        it is not correctly based for another operating system version and
        you lose any advantage in load time.

        If it really worried you, you would use the DLL calls from IMAGEHLP
        to rebase the programs that you install on another computer on the
        fly. This may in fact have some marginal load time advantage if you
        were using very large C++ DLLs with the 16k alignment from VC 6 but
        with PBDLL coded DLLs, this would be reduced by the alignment
        difference.

        If you really need to load a DLL the fast way, you use LoadLibrary() and
        GetProcAddress() and load it dynamically,(the reason why they are
        called DYNAMIC LINK LIBRARIES) as this has the lowest overhead.

        This is a very straight forward approach in PowerBASIC and it has
        the added advantage of lowering the memory footprint of your complete
        application.

        Regards,

        [email protected]

        ------------------


        [This message has been edited by Steve Hutchesson (edited May 11, 2000).]
        hutch at movsd dot com
        The MASM Forum - SLL Modules and PB Libraries

        http://www.masm32.com/board/index.php?board=69.0

        Comment

        Working...
        X