[Lazarus] Large program size - 1.8 MB for empty GUI project (uses clause in initialization vs implementation?)

Marco van de Voort marcov at stack.nl
Fri Apr 10 15:00:17 CEST 2009


On Fri, Apr 10, 2009 at 02:22:06PM +0400, dmitry boyarintsev wrote:
> Can compiler detect, if initialized procedure variable is not used and
> smartlink it off?
> In the following example:
> there's a global procedure variable. it's initialized by unit2, that
> is used by program.
> but even if it's initialized, the procedure itself (someProc) is never called.
> So, is it possible to cut off someProc and MyProc as well?

In theory this could be done I think, but it is a global optimization, and
is currently not yet done.
 
Global optimization have a lot of practical concerns though since they often
require multiple compilation passes, and thus a lot of infrastructure to
make it end-user ready.



More information about the Lazarus mailing list