If we are very sure that our .bpl packages has no duplicate unit name, we may safely ignore the call to "CheckForDuplicateUnits" procedure. It should improve the loading speed of your Delphi application that built with runtime packages.procedure
InitializePackage(Module: HMODULE; AValidatePackage: TValidatePackageProc);type
TPackageLoad =procedure
;var
PackageLoad: TPackageLoad;begin
CheckForDuplicateUnits(Module, AValidatePackage); @PackageLoad := GetProcAddress(Module,'Initialize'
);//Do not localize
if
Assigned(PackageLoad)then
PackageLoadelse
raise
EPackageError.CreateFmt(sInvalidPackageFile, [GetModuleName(Module)]);end
;
Wednesday, October 24, 2007
Improve the loading speed of Delphi application built with runtime package
I just come across with the article The ultimate Delphi IDE start-up hack
When we use SysUtils.LoadPackage in Delphi, the following procedure will be invoked:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment