Board index » delphi » Delphi EXE filesizes

Delphi EXE filesizes

I've shifted from Visual Basic 4.0 to Delphi 2.0.  I find that
Delphi generates very large EXE files.  Even a minimal app with
with just a single unit generates sizes in the range of 190KB !!
The equivalent VB app filesize would be under 10K !  Is there
anyway I can cut down on the filesizes in Delphi 2.0 ??
TIA,
Kevin Arouza
kevaro...@poboxes.com

 

Re:Delphi EXE filesizes


Kevin Arouza wrote in article <5dhv6r$...@lana.zippo.com>...

Quote
> I've shifted from Visual Basic 4.0 to Delphi 2.0.  I find that
> Delphi generates very large EXE files.  Even a minimal app with
> with just a single unit generates sizes in the range of 190KB !!
> The equivalent VB app filesize would be under 10K !  Is there
> anyway I can cut down on the filesizes in Delphi 2.0 ??

As most people will tell you, Delphi creates larger EXE files, BUT
does not require huge runtime files.  Visual Basic may create
a 10k EXE, but it also requires 2 mb of support files.

mike

Re:Delphi EXE filesizes


kevin,

is the exe size really that big when you consider that every vb4 app
mandates that you ship vb4xxx.dll? (and every 16 bit vb4 app requires that
you also bundle the shared ms OLE2 files) ???

On the other hand, with >=1.6 gig hard drives being standard on most new
machines, what's a 190k ??? (<G>)

-Bart

Kevin Arouza wrote in article <5dhv6r$...@lana.zippo.com>...

Quote
> I've shifted from Visual Basic 4.0 to Delphi 2.0.  I find that
> Delphi generates very large EXE files.  Even a minimal app with
> with just a single unit generates sizes in the range of 190KB !!
> The equivalent VB app filesize would be under 10K !  Is there
> anyway I can cut down on the filesizes in Delphi 2.0 ??
> TIA,
> Kevin Arouza
> kevaro...@poboxes.com

Re:Delphi EXE filesizes


Quote
Kevin Arouza wrote:
>I've shifted from Visual Basic 4.0 to Delphi 2.0.  I find that
>Delphi generates very large EXE files.  Even a minimal app with
>with just a single unit generates sizes in the range of 190KB !!
>The equivalent VB app filesize would be under 10K !  Is there
>anyway I can cut down on the filesizes in Delphi 2.0 ??

Correction. The VB4 app is 10K + 722k for the runtime.

Re:Delphi EXE filesizes


Realize that even a simple Delphi program may contain LOTS of objects
that you don't use.  You can remove these objects, but its a real
pain.  If you want to play a little, try adding a lot more
functionality to the program, and you will notice that the size won't
grow NEARLY as fast.  Thats because it doesn't have to add many more
objects, because they are alread there.  It REALY shines on a very
large program with lots of forms.

BTW, that 10K VB5 program will also cost a 1.2meg DLL that you have to
ship with it.

On 9 Feb 1997 02:11:39 GMT, "Bart Davis" <bhda...@worldsahead.com>
wrote:

Quote
>kevin,

>is the exe size really that big when you consider that every vb4 app
>mandates that you ship vb4xxx.dll? (and every 16 bit vb4 app requires that
>you also bundle the shared ms OLE2 files) ???

>On the other hand, with >=1.6 gig hard drives being standard on most new
>machines, what's a 190k ??? (<G>)

>-Bart

>Kevin Arouza wrote in article <5dhv6r$...@lana.zippo.com>...
>> I've shifted from Visual Basic 4.0 to Delphi 2.0.  I find that
>> Delphi generates very large EXE files.  Even a minimal app with
>> with just a single unit generates sizes in the range of 190KB !!
>> The equivalent VB app filesize would be under 10K !  Is there
>> anyway I can cut down on the filesizes in Delphi 2.0 ??
>> TIA,
>> Kevin Arouza
>> kevaro...@poboxes.com

------------------------------------------------------
Wake up and smell the Clintons!

I reserve the right to respond to e-mail. I also reserve the right of response in my manner, commercial unsolicited e-mail vendors, please take note. Using this message in any fashion constitutes acceptance of these terms.  With that said:
I reply to all junk E-Mail.  Over, and over, and over...  :)
If we all did, maybe we wouldn't get as much!

Re:Delphi EXE filesizes


Quote
Kevin, Arouza wrote:

> I've shifted from Visual Basic 4.0 to Delphi 2.0.  I find that
> Delphi generates very large EXE files.  Even a minimal app with
> with just a single unit generates sizes in the range of 190KB !!
> The equivalent VB app filesize would be under 10K !  Is there
> anyway I can cut down on the filesizes in Delphi 2.0 ??
> TIA,

I understand that Delphi 3.0 (or is it Delphi 97) will bring you
a new choice for this problem. The big EXE files can be divided
to generally used bigger DLL + a small EXE file.  I have not seen
any documentation about this, only some comments that I have heard.

Personally I don't like at all the way all the Windows EXE files
look inside. When you look inside some Delphi compiled EXE file,
you see all your procedure and function names in pure ASCII-format.
And also all the variable names seem to be there in clearly redable format.
If you use lenghthy variable names, 'CustomerDataCopiedFromMainDatabase',
this will also increase the size of your EXE-file.

From the old DOS days I remember that there was no matter how long
variable names you have in your source code. The compiler would
replace it with a single pointer or integer, and your EXE will be
always the same size regardless of the variable name.

Or is there something I have missed? Should the variables be in
readable format even after Delphi Optimized compilation?
 Can somebody recommend some Windows EXE file compresser?

Markku Nevalainen

Re:Delphi EXE filesizes


Well, the 190k's ARE a problem if you want to distribute the apps on
diskette. OK, 190k is fine since a disk is 1.44M but a Delphi project
easily gets to be some 4-500k. And if you have 3 apps you want to
distribute you'll need more than one disk.

OTOH, there is NO alternative.
As so many others already have said, VB requires dlls to be distributed,
and
yukk, what do I do when there are different versions of these dlls?
There
has to be problems with that...

Quote
Bart Davis wrote:

> kevin,

> is the exe size really that big when you consider that every vb4 app
> mandates that you ship vb4xxx.dll? (and every 16 bit vb4 app requires that
> you also bundle the shared ms OLE2 files) ???

> On the other hand, with >=1.6 gig hard drives being standard on most new
> machines, what's a 190k ??? (<G>)

> -Bart

--
Svante Granqvist                 Speech, Music and Hearing
Phone +46-8-790 7561             Box 700 14
Fax   +46-8-790 7854             S-100 44 Stockholm
mailto:sva...@speech.kth.se      http://www.speech.kth.se/~svante

Re:Delphi EXE filesizes


You have the debug information in the EXE.  See Project Options to turn
it off.  This information is not loaded at run time.

Lance

Quote
Markku Nevalainen wrote:

> Kevin, Arouza wrote:

> > I've shifted from Visual Basic 4.0 to Delphi 2.0.  I find that
> > Delphi generates very large EXE files.  Even a minimal app with
> > with just a single unit generates sizes in the range of 190KB !!
> > The equivalent VB app filesize would be under 10K !  Is there
> > anyway I can cut down on the filesizes in Delphi 2.0 ??
> > TIA,

> I understand that Delphi 3.0 (or is it Delphi 97) will bring you
> a new choice for this problem. The big EXE files can be divided
> to generally used bigger DLL + a small EXE file.  I have not seen
> any documentation about this, only some comments that I have heard.

> Personally I don't like at all the way all the Windows EXE files
> look inside. When you look inside some Delphi compiled EXE file,
> you see all your procedure and function names in pure ASCII-format.
> And also all the variable names seem to be there in clearly redable format.
> If you use lenghthy variable names, 'CustomerDataCopiedFromMainDatabase',
> this will also increase the size of your EXE-file.

> From the old DOS days I remember that there was no matter how long
> variable names you have in your source code. The compiler would
> replace it with a single pointer or integer, and your EXE will be
> always the same size regardless of the variable name.

> Or is there something I have missed? Should the variables be in
> readable format even after Delphi Optimized compilation?
>  Can somebody recommend some Windows EXE file compresser?

> Markku Nevalainen

Re:Delphi EXE filesizes


Switching off Debug information seems to have minimal effect on an 800K
exe. probably 1 or 2K.

Does the Delphi Compiler not remove all unrefernced and unused code from
the EXE. Compare it with a small Windows EXE written in Visual or Borland
C.

Anybody any ideas...

Donagh

lhirsch <lhir...@ibm.net> wrote in article <32FF5474.2...@ibm.net>...

Quote
> You have the debug information in the EXE.  See Project Options to turn
> it off.  This information is not loaded at run time.

> Lance

Re:Delphi EXE filesizes


Ok, so you compress the files.

Have you tried talking to Bill Gates about your problem?  Maybe he can help
you

E.

Svante Granqvist <sva...@speech.kth.se> wrote in article
<32FE5846.1...@speech.kth.se>...

Quote
> Well, the 190k's ARE a problem if you want to distribute the apps on
> diskette. OK, 190k is fine since a disk is 1.44M but a Delphi project
> easily gets to be some 4-500k. And if you have 3 apps you want to
> distribute you'll need more than one disk.

> OTOH, there is NO alternative.
> As so many others already have said, VB requires dlls to be distributed,
> and
> yukk, what do I do when there are different versions of these dlls?
> There
> has to be problems with that...

> Bart Davis wrote:

> > kevin,

> > is the exe size really that big when you consider that every vb4 app
> > mandates that you ship vb4xxx.dll? (and every 16 bit vb4 app requires
that
> > you also bundle the shared ms OLE2 files) ???

> > On the other hand, with >=1.6 gig hard drives being standard on most
new
> > machines, what's a 190k ??? (<G>)

> > -Bart

> --
> Svante Granqvist                 Speech, Music and Hearing
> Phone +46-8-790 7561             Box 700 14
> Fax   +46-8-790 7854             S-100 44 Stockholm
> mailto:sva...@speech.kth.se      http://www.speech.kth.se/~svante

Re:Delphi EXE filesizes


No I don't think so. There are these switches to turn of or on
in Delphi 1.0:

 -Project Options/Compiler / Debug Information     ON <--> OFF
 -Project Options/Linker / Include TDW debug info  ON <--> OFF
 -Environment Options /Compile with Debug Info     ON <--> OFF
 -Environment Options /Integrated Debugging        ON <--> OFF

I think that I have testede every single combination with these
switches, but my EXE keeps its size as 956 kB at minimum.
And in EXE there still is a lot of my variables in visible ASCII
format, that does not look out very efficient.

If you or anyone else has some suggestions about those switches,
with D1, please reply.

Markku Nevalainen

Quote
>lhirsch wrote:

> You have the debug information in the EXE.  See Project Options to turn
> it off.  This information is not loaded at run time.

> Markku Nevalainen wrote:

> > Personally I don't like at all the way all the Windows EXE files
> > look inside. When you look inside some Delphi compiled EXE file,
> > you see all your procedure and function names in pure ASCII-format.
> > And also all the variable names seem to be there in clearly redable format.
> > If you use lenghthy variable names, 'CustomerDataCopiedFromMainDatabase',
> > this will also increase the size of your EXE-file.

> > From the old DOS days I remember that there was no matter how long
> > variable names you have in your source code. The compiler would
> > replace it with a single pointer or integer, and your EXE will be
> > always the same size regardless of the variable name.

Re:Delphi EXE filesizes


On 10 Feb 1997 21:13:29 GMT, "Donagh Kiernan" <d_kier...@vistech.ie>
wrote:

Quote
>Switching off Debug information seems to have minimal effect on an 800K
>exe. probably 1 or 2K.

>Does the Delphi Compiler not remove all unrefernced and unused code from
>the EXE. Compare it with a small Windows EXE written in Visual or Borland
>C.

This has all been beaten to death on this newsgroup, but here is a
quick summary.

A hello world Delphi VCL based application is ~200k.  Including any of
the VCL will cause the entire VCL to be linked in.  (Don't forget in
Delphi 1.0 that you can use the w8loss program).

A hello world MFC Visual C++ or OWL Borland C++ program that has the
statically linked libraries is usually of an equal or larger size.

In Visual C++ or Borland C++ you can dynamically link with the runtime
library, which gives you a small exe, but means you have to distribute
a large dll with your application (the DLL for MFC4.0 is about 1 MB).
This option is not available in Delphi 1.0, or 2.0, but is rumoured to
be available in 3.0.  

A hello world Delphi windows API application (no VCL) is about 10k.
It is actually slightly smaller than the same application written in
straight C with the borland or Microsoft compilers.

So - if you compare comparable projects (windows api, windows
framework) between c and delphi,  they are close, with Delphi usually
being smaller.

Having the option in 3.0 to use a runtime dll will make some people
happy, but will undoubtably cause some distribution headaches.

Brian

Re:Delphi EXE filesizes


Hello Kevin:

Quote
> Delphi generates very large EXE files.  Even a minimal app with
> with just a single unit generates sizes in the range of 190KB !!
> The equivalent VB app filesize would be under 10K !  Is there

        Delphi EXE file its realy stand alone EXE file :-) , while VB EXE file
need VBRUN?00.DLL ( for example VBRUN300.DLL size 399Kb);-( . Then 10Kb +
399Kb = 409Kb while the same in delphi is 190Kb.

Best Regards, Ricardo.

--
;-D*****************************
Ricardo Santiago Cachero.
rsant...@sp-editores.es
*****************************;-D

Re:Delphi EXE filesizes


Quote
Ricardo Santiago wrote:

         Delphi EXE file its realy stand alone EXE file :-) , while VB
EXE file

Quote
> need VBRUN?00.DLL ( for example VBRUN300.DLL size 399Kb);-( . Then 10Kb +
> 399Kb = 409Kb while the same in delphi is 190Kb.

Of course, if you had 10 vb exe's at 10k each and 1 vbrun file at 399K,
that would be 499K vs. Delphi 1900K!
--
Frank Cooley
f...@dnaco.net

Re:Delphi EXE filesizes


Quote
In article <330395E8.1...@dnaco.net>, Frank Cooley <f...@dnaco.net> wrote:
>Ricardo Santiago wrote:
>         Delphi EXE file its realy stand alone EXE file :-) , while VB
>EXE file
>> need VBRUN?00.DLL ( for example VBRUN300.DLL size 399Kb);-( . Then 10Kb +
>> 399Kb = 409Kb while the same in delphi is 190Kb.

>Of course, if you had 10 vb exe's at 10k each and 1 vbrun file at 399K,
>that would be 499K vs. Delphi 1900K!

The hell you will.

You need vbrun??00.DLL where ?? runs from 1 to 10.
And several versions (with the same number, but still different) of the other
DLL's .

The Graphical Gome      (r...@ktibv.nl)

Senior Software Engineer

--------------------------------------------------------------------------------------------------------------
Delphi developers FAQ at http://www.gnomehome.demon.nl/uddf/index.htm
Non frame version     at  http://www.gnomehome.demon.nl/uddf/indexnf.htm

Go to page: [1] [2]

Other Threads