Board index » delphi » Alright, I'm confused now (DLL size)

Alright, I'm confused now (DLL size)

I've just recently started re-designing my application to use COM DLLs for
added extensibility. In an effort to reduce the size of those DLLs (they
are ~300 KBs large even with minimal functionality) I discovered this:

If I open up the COM object's type libibrary (xxx_TLB.pas) and comment out
the first "uses" clause, the project still builds. What's more, the size of
the DLL is reduced from 300 to 80 KB(!)  

How is this possible? Why is Delphi adding all those units to the uses
clause of the TLB when they're apparently not needed? Are there any side-
effects connected with commenting out the uses clause?

-J

 

Re:Alright, I'm confused now (DLL size)


Delphi bug: it adds OleCtrls unit to the uses clause of each xxx_TLB.pas file it
can get its hands on. Doesn't relly matter if you are using Forms unit elseweher
in your project, otherwise the difference is around 200k.
AFAIK Borland is aware of the problem, now how about finally fixing it?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool

Quote
"John Anderson" <no.em...@no.spam.net> wrote in message

news:Xns9210C32BF76C964265264562456246246@207.105.83.65...
Quote
> I've just recently started re-designing my application to use COM DLLs for
> added extensibility. In an effort to reduce the size of those DLLs (they
> are ~300 KBs large even with minimal functionality) I discovered this:

> If I open up the COM object's type libibrary (xxx_TLB.pas) and comment out
> the first "uses" clause, the project still builds. What's more, the size of
> the DLL is reduced from 300 to 80 KB(!)

> How is this possible? Why is Delphi adding all those units to the uses
> clause of the TLB when they're apparently not needed? Are there any side-
> effects connected with commenting out the uses clause?

> -J

Other Threads