You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
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.
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!
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
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.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment