The handling of runtime packages confuses me (Delphi 7). The way I understand it is like this:
You have to compile with “build with runtime packages” ticked in project-options-packages.
If a package does not appear in the “edit runtime packages list” the units it contains will be smart linked into the executable.
If a package appears in the “edit runtime packages list” and any unit it contains appears anywhere in the Uses clause’s of the application the package will automatically be statically loaded at startup of the executable.
If a package appears in the “edit runtime packages list” and none of the units it contains appears anywhere in a Uses clause of the application it will not be statically loaded at runtime but has to be dynamically loaded with loadpackage.
What happens with units that are Used by a unit in the CONTAINS part of the package (in other words a unit in a package in the REQUIRES clause of the package)?? Does the “required” packages get compiled into the package even though these units are already declared in the apllication’s Uses clauses? That could lead to a unit in a package being linked into the executable at compile time and the again loaded if the package is loaded with loadpackage at runtime.
Turbo Pascal had a very efficient overlay manager to handle called routines from overlay files. The delphi package (BPL ) handling is obviously not as efficient?? Maybe the Codegear guys could give us something similar in Delphi. Even in these times of bloated software and powerful hardware, one has to look at ways and means of optimising ones applications if they become quite large.
Hey you clever guys out there please enlighten me on my lack of knowledge regarding packages. Thanks!!!