Board index » delphi » Reducing size of EXE D4->D3

Reducing size of EXE D4->D3

Sorry if the question is too stupid - I don't use Delphi often...

I have some apps written under D3. After rebuilding them
in D4, the size of exe files grew by approx. 100 kb.
I'd like to use D4 for development, but can't afford swelling of
the exe files. Using runtime packages is not an option, each program
must be a standalone exe file.

Is it possible to reduce the size of D4 runtime at least to
the size of D3? My apps do not use new components added in D4,
Internet, advanced graphics and database stuff.

Can anyone kindly teach me how to do it?

--PA

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

 

Re:Reducing size of EXE D4->D3


Quote
Pavel A. <pav...@my-deja.com> wrote:
>Is it possible to reduce the size of D4 runtime at least to
>the size of D3?

Make sure the program option/compiler/optimization is on.  That
reduces the size some.  (It is on by default.)

But 100KB in the EXE doesn't seem like it would matter much.]

Jud McCranie

Re:Reducing size of EXE D4->D3


look at:
http://www.jordanr.dhs.org/striprlc.htm
i haven't tested this myself, so i don't know how much the
reduction in filesize is

Quote
"Pavel A." wrote:
> Sorry if the question is too stupid - I don't use Delphi often...

> I have some apps written under D3. After rebuilding them
> in D4, the size of exe files grew by approx. 100 kb.
> I'd like to use D4 for development, but can't afford swelling of
> the exe files. Using runtime packages is not an option, each program
> must be a standalone exe file.

> Is it possible to reduce the size of D4 runtime at least to
> the size of D3? My apps do not use new components added in D4,
> Internet, advanced graphics and database stuff.

> Can anyone kindly teach me how to do it?

> --PA

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

--

Re:Reducing size of EXE D4->D3


Get rid of all nonused functions in your
uses clause.  This should get rid of any
excess code baggage.

Mark
--------------------------
m...@godex.com

Quote
Pavel A. wrote in message

<7r6ktu$4o...@nnrp1.deja.com>...
|Sorry if the question is too stupid - I
don't use Delphi often...
|
|I have some apps written under D3.
After rebuilding them
|in D4, the size of exe files grew by
approx. 100 kb.
|I'd like to use D4 for development, but
can't afford swelling of
|the exe files. Using runtime packages
is not an option, each program
|must be a standalone exe file.
|
|Is it possible to reduce the size of D4
runtime at least to
|the size of D3? My apps do not use new
components added in D4,
|Internet, advanced graphics and
database stuff.
|
|Can anyone kindly teach me how to do
it?
|
|--PA
|
|
|Sent via Deja.com http://www.deja.com/
|Share what you know. Learn what you
don't.

Re:Reducing size of EXE D4->D3


Quote
Marko wrote:

> Get rid of all nonused functions in your
> uses clause.  This should get rid of any
> excess code baggage.

> Mark

Mark(o),
USES causes the compiler to use units at compile time. Unused code will is
finally removed by the linker. Removing units from the USES clause by hand has
nearly no effect.
-Michael

Re:Reducing size of EXE D4->D3


On Thu, 09 Sep 1999 23:13:48 +0200, Michael Winter <win...@foni.net>
wrote:

Quote
>USES causes the compiler to use units at compile time. Unused code will is
>finally removed by the linker. Removing units from the USES clause by hand has
>nearly no effect.

It depends a lot on what you remove.  When you use a unit, you link in
the initialization section and everything it references.  If the unit
has no initialization section or a very small one (e.g. the Buttons
unit), then removing it won't help much.  But if the unit's
initialization section references a whole load of unused code (e.g.
the DB units, which will be left in your uses clause if you add one of
the database controls and then remove it), then removing the unit can
make a noticeable difference.

Duncan Murdoch

Re:Reducing size of EXE D4->D3


I use a product called Shrinker from Blinlinc (www.blinkinc.com) which
reduces the size of my *.exe files by about 50%. It can be used on any *.exe
or *.dll file not only those created in Delphi so you can use it to reduce
space on your hard drive as well.
I have found this to be an excellent product.

I believe there may be other shareware or freeware products around that do a
similar job.

Mike Best
--
Mike Best Programming
Brisbane
Australia

Quote
Pavel A. wrote in message <7r6ktu$4o...@nnrp1.deja.com>...
>Sorry if the question is too stupid - I don't use Delphi often...

>I have some apps written under D3. After rebuilding them
>in D4, the size of exe files grew by approx. 100 kb.
>I'd like to use D4 for development, but can't afford swelling of
>the exe files. Using runtime packages is not an option, each program
>must be a standalone exe file.

>Is it possible to reduce the size of D4 runtime at least to
>the size of D3? My apps do not use new components added in D4,
>Internet, advanced graphics and database stuff.

>Can anyone kindly teach me how to do it?

>--PA

>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.

Re:Reducing size of EXE D4->D3


In article <%2WB3.14530$ei1.29...@newsfeeds.bigpond.com>

Quote
"Mike Best" <lin...@bigpond.com.au> wrote:
> I use a product called Shrinker from Blinlinc (www.blinkinc.com) which
> reduces the size of my *.exe files by about 50%. It can be used on any *.exe
> or *.dll file not only those created in Delphi so you can use it to reduce
> space on your hard drive as well.
> I have found this to be an excellent product.

> I believe there may be other shareware or freeware products around that do a
> similar job.

1. Aspack (shareware)
2. WWPack32 (shareware)
3. UPX (freeware)

They all do a pretty good job compressing Win32 binaries. UPX has
the advantage of being able to compress Dos and Linux binaries
as well.

Best regards, The Chief
--------------
Dr A Olowofoyeku (The African Chief)
Email: la...@keele.ac.uk
Homepage: http://ourworld.compuserve.com/homepages/African_Chief/
Author of Chief's Installer Pro v5.20a for Win32
    ftp://ftp.simtel.net/pub/simtelnet/win95/install/chief52a.zip

Re:Reducing size of EXE D4->D3


Duncan Murdoch schrieb:

Quote

> It depends a lot on what you remove.  When you use a unit, you link in
> the initialization section and everything it references.  If the unit
> has no initialization section or a very small one (e.g. the Buttons
> unit), then removing it won't help much.  But if the unit's
> initialization section references a whole load of unused code (e.g.
> the DB units, which will be left in your uses clause if you add one of
> the database controls and then remove it), then removing the unit can
> make a noticeable difference.

> Duncan Murdoch

You are right again, Duncan. Since I'm not dealing so much with DB
programming, I'm using DB unit not so often and never had a look at
their source. However, I believe it would be a better programming style
not to do so much in initialization code. BTW, at the end of a project I
also use this method (delete all from uses and re-append appropriate
units depending on compiler errors).

Some minutes later...

I just tested it:

Nearly empty project: 287 KB
Added a DBGrid: 509 KB
Removed it: 300 KB

13 KB is not sooooo much...

-Michael

Re:Reducing size of EXE D4->D3


la...@remove-this.keele.ac.uk (The African Chief) wrote:
Quote
> In article <%2WB3.14530$ei1.29...@newsfeeds.bigpond.com>
> "Mike Best" <lin...@bigpond.com.au> wrote:
> > I use a product called Shrinker from Blinlinc (www.blinkinc.com)
which
> > reduces the size of my *.exe files by about 50%.
[snip]
> 1. Aspack (shareware)
> 2. WWPack32 (shareware)
> 3. UPX (freeware)

[snip]

Thank you very much! If nothing elese helps, I'll try
compression... If it can reduce my EXEs to 70% of the orig. size,
this will make for the extra 100k.

But really I was looking for some optimization hints,
like $define's for conditional compilation of the runtime units.
May be it is possible to use D3 runtime with D4?

Regards
-PA

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

Re:Reducing size of EXE D4->D3


Quote
Pavel A. <pav...@my-deja.com> wrote:
>Thank you very much! If nothing elese helps, I'll try
>compression... If it can reduce my EXEs to 70% of the orig. size,
>this will make for the extra 100k.

Why do you need to save 100KB in the EXE file?  Is that 100KB
taking up too much disk space, is it making it too large to
distrubite, is it using too much RAM, taking too long to load,
or what?  Compression will help in the first two cases, but not
the third.  It would help to know why you need to reduce the EXE
by 100KB.

Jud McCranie

Re:Reducing size of EXE D4->D3


See Jordan Russell's comments at
http://www.jordanr.dhs.org/striprlc.htm#execomp

He makes some good points about why you should NOT use exe compressors, plus
provides an alternative that may be better in alot of case.

Cheers,
F. Hovey
fredh@earthling_DOT_net (replace _DOT_ with period to reply)

Re:Reducing size of EXE D4->D3


Quote
jud.mccranie(at)mindspring.com wrote:
> Why do you need to save 100KB in the EXE file?

Yes, too large to distribute. Now I have to change the setup procedure,
add compression etc. And how do I explain to my customers that
the files now take more room just because of another version of
compiler, no new functionality.
And each exe will take up 0.1 mb more RAM - just for nothing.
Just hate this swelling with no visible reason.

Thanks,
-- PA

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

Re:Reducing size of EXE D4->D3


Quote
Pavel A. <pav...@my-deja.com> wrote:
>Yes, too large to distribute. Now I have to change the setup procedure,
>add compression etc. And how do I explain to my customers that
>the files now take more room just because of another version of
>compiler, no new functionality.
>And each exe will take up 0.1 mb more RAM - just for nothing.
>Just hate this swelling with no visible reason.

You can zip them to distribute them.  they must be running
Windows, so they must have at least 32MB, so 0.1MB isn't very
much.

Jud McCranie

Re:Reducing size of EXE D4->D3


Just because the exe is larger does not mean that the RAM footprint is any
bigger.

Will your customers even notice, let alone ask?

If you were using one of the license compliant methods of distribution, e.g.
InstallSheild, you would already have compressed releases and you wouldn't
have to make any changes, you would just rebuild the release.

I don't think that the developers at Borland spend their time dreaming up
new ways of bloating their code. Probably just the opposite. While the
reasons may not be immediately visible to you that doesn't mean the reasons
are invalid.

Quote
Pavel A. <pav...@my-deja.com> wrote in message

news:7rlu8a$pvd$1@nnrp1.deja.com...
Quote
> jud.mccranie(at)mindspring.com wrote:
> > Why do you need to save 100KB in the EXE file?

> Yes, too large to distribute. Now I have to change the setup procedure,
> add compression etc. And how do I explain to my customers that
> the files now take more room just because of another version of
> compiler, no new functionality.
> And each exe will take up 0.1 mb more RAM - just for nothing.
> Just hate this swelling with no visible reason.

> Thanks,
> -- PA

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

Go to page: [1] [2]

Other Threads