Delphi 2010 executable size increase

I noticed that as I convert my code from D2007 to D2010 my executables are 
increasing in size by as much as 8 MB
Yes this one was big to begin with but to jump from 22 MB to 30 MB is a bit 
too much. Is this normal? Is anyone else seeing this? Anything I can do or 
is this just progress live with it?
Thanks
0
Eug
12/1/2009 11:02:47 PM
embarcadero.delphi.non-tech 5933 articles. 1 followers. Follow

53 Replies
1345 Views

Similar Articles

[PageSpeed] 15
Get it on Google Play
Get it on Apple App Store

"E C" <sundiskx@NoSpamhotpop.com> wrote in message 
news:188890@forums.codegear.com...
>I noticed that as I convert my code from D2007 to D2010 my executables are 
>increasing in size by as much as 8 MB
> Yes this one was big to begin with but to jump from 22 MB to 30 MB is a 
> bit too much. Is this normal? Is anyone else seeing this? Anything I can 
> do or is this just progress live with it?
> Thanks

A big chunk of that is related to the unicode support - both larger strings 
and the lookup tables that are bound to the exe. So yes, you pretty much 
have to live with it after moving to D2009 or D2010.
0
Dave
12/1/2009 11:05:28 PM
Dave White wrote:
> "E C" <sundiskx@NoSpamhotpop.com> wrote in message 
> news:188890@forums.codegear.com...
>> I noticed that as I convert my code from D2007 to D2010 my executables are 
>> increasing in size by as much as 8 MB
>> Yes this one was big to begin with but to jump from 22 MB to 30 MB is a 
>> bit too much. Is this normal? Is anyone else seeing this? Anything I can 
>> do or is this just progress live with it?
>> Thanks
> 
> A big chunk of that is related to the unicode support - both larger strings 
> and the lookup tables that are bound to the exe. So yes, you pretty much 
> have to live with it after moving to D2009 or D2010.

I guess the majority comes from RTTI stuff. Switch off RTTI generation 
in the compiler.
0
Ralf
12/1/2009 11:10:34 PM
"E C" <sundiskx@NoSpamhotpop.com> wrote in message 
news:188890@forums.codegear.com...
>I noticed that as I convert my code from D2007 to D2010 my executables are 
>increasing in size by as much as 8 MB
> Yes this one was big to begin with but to jump from 22 MB to 30 MB is a 
> bit too much. Is this normal? Is anyone else seeing this? Anything I can 
> do or is this just progress live with it?


Two major reasons - the change from ansi to unicode (D2009) and the addition 
of a lot more RTTI (D2010).

If you are certain you don't care about the new RTTI feature there is a way 
to omit this. Do a search on RTTI and D2010.

-- 
Wayne Niddery (TeamB)
0
Wayne
12/1/2009 11:57:42 PM
Dave White wrote:

> 
> A big chunk of that is related to the unicode support - both larger
> strings and the lookup tables that are bound to the exe. So yes, you
> pretty much have to live with it after moving to D2009 or D2010.

No, that's not really true.  Unicode support won't really add much size
to your binaries.

Most of that increase will come from the new RTTI support in D2010.

-- 
Nick Hodges
Delphi Development Manager
Embarcadero Technologies
0
Nick
12/2/2009 12:13:57 AM
How do I turn the RTTI off?

Best wishes,

Valgarður Guðjónsson
0
Valgardur
1/11/2010 6:39:16 PM
Am 11.01.2010 19:39, schrieb Valgardur Gudjonsson:
> How do I turn the RTTI off?
> 
> Best wishes,
> 
> Valgarður Guðjónsson

Look at the various posts about RTTI a few weeks back from now.
There are compiler directives for this.

Greetings

Markus
0
Markus
1/11/2010 6:47:30 PM
I (naturally) have, and looked for Delphi & RTTI as well but found nothing useful, the little I found did not work.

Does no one know how to disable this?

The help file did not install, so not much use there...
0
Valgardur
1/11/2010 8:02:54 PM
<Valgardur Gudjonsson> wrote in message news:201929@forums.codegear.com...
>I (naturally) have, and looked for Delphi & RTTI as well but found nothing 
>useful, the little I found did not work.
>
> Does no one know how to disable this?
>
> The help file did not install, so not much use there...

http://docwiki.embarcadero.com/RADStudio/en/RTTI_directive_(Delphi)
0
Daniel
1/11/2010 8:30:53 PM
Valgardur Gudjonsson wrote:

> I (naturally) have, and looked for Delphi & RTTI as well but found
> nothing useful, the little I found did not work.

What did not work?  We use RTTI a ton and it's working for us.
 
> Does no one know how to disable this?

{$RTTI } Directive per unit will change the behavior, see system.pas
for an example.
 
> The help file did not install, so not much use there...

The Help file needs to be installed seperately.

-- 
Robert Love
0
Robert
1/11/2010 8:36:09 PM
Thanks for quick replies, 

But I get an compiler error if I use the {$RTTI} - "E1030 Invalid Compiler Directive" - is this version/edtition specific?

The http://docwiki.embarcadero.com/RADStudio/en/RTTI_directive_ has no text, gives "There is currently no text in this page"

I am looking to disable RTTI hoping to reduce the executable file size, my application took a leap from 4Mb to 11Mb.

Best wishes,

Valgarður Guðjónsson
0
Valgardur
1/11/2010 9:12:02 PM
<Valgardur Gudjonsson> wrote in message news:201986@forums.codegear.com...
> Thanks for quick replies,
>
> But I get an compiler error if I use the {$RTTI} - "E1030 Invalid Compiler 
> Directive" - is this version/edtition specific?
>
> The http://docwiki.embarcadero.com/RADStudio/en/RTTI_directive_ has no 
> text, gives "There is currently no text in this page"
>
> I am looking to disable RTTI hoping to reduce the executable file size, my 
> application took a leap from 4Mb to 11Mb.
>
> Best wishes,
>
> Valgarður Guðjónsson

Hmm, I can't seem to get that final bracket to link properly, the URL is: 
"http://docwiki.embarcadero.com/RADStudio/en/RTTI_directive_(Delphi)"
but you may need to add the final close bracket ')' yourself .

Or, go to: 
http://docwiki.embarcadero.com/RADStudio/en/Working_with_RTTI_Index + it's 
under "See Also: RTTI directive (Delphi)".

Basically {$RTTI} won't work by itself, because it needs extra arguments 
(the help explains it better than I can).
0
Daniel
1/11/2010 9:35:19 PM
Valgardur Gudjonsson wrote:

>Thanks for quick replies, 
>
>But I get an compiler error if I use the {$RTTI} - "E1030 Invalid
>Compiler Directive" - is this version/edtition specific?
>
>The http://docwiki.embarcadero.com/RADStudio/en/RTTI_directive_ has
>no text, gives "There is currently no text in this page"
>
>I am looking to disable RTTI hoping to reduce the executable file
>size, my application took a leap from 4Mb to 11Mb.


You are using the wrong like link (use the one Daniel gave you and
notice the missing ")", for some reason those wiki links dont work very
well in mail..

or use
http://docwiki.embarcadero.com/RADStudio/en/RTTI_directive_%28Delphi%29
0
Marius
1/11/2010 9:35:58 PM
Thanks again, but I am looking for ways to disable the RTTI, not information on how to use it, to reduce the size of my executables.

I must admit, being a faithful Delphi user from the beginning, that this is very strange, adding RTTI which has no value for me (and I assume many other developers) which in turn more than triples the size of my exe files, this is on by default and no clear way to disable it.

Best wishes,

Valgarður Guðjónsson
0
Valgardur
1/12/2010 10:14:18 AM
I have done searches on RTTI and Delphi 2010, a lot of information on how to use it, but no information on how to disable it.

Best wishes,

Valgarður Guðjónsson
0
Valgardur
1/12/2010 10:15:33 AM
Hi Valgardur,

> I have done searches on RTTI and Delphi 2010, a lot of information on how to use it, but no information on how to disable it.

You can disable it.

Open your .dpr project file and add the following line *before* the uses 
clause:

{$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}

That should shrink your executable size again.

> Valgarður Guðjónsson

Groetjes,
           Bob Swart

-- 
Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
President Delphi section Software Development Netherlands: www.sdn.nl
Embarcadero Technology Partner - Delphi & RAD Studio Reseller BeNeLux
Delphi Win32 & .NET books on Lulu.com: http://stores.lulu.com/drbob42
Personal courseware + e-mail support http://www.ebob42.com/courseware
Blog: http://www.drbob42.com/blog - RSS: http://eBob42.com/weblog.xml
0
Bob
1/12/2010 10:47:01 AM
Am 12.01.2010 11:14, Valgardur Gudjonsson wrote:
> Thanks again, but I am looking for ways to disable the RTTI, not information on how to use it, to reduce the size of my executables.
>

If you carefully read the page Marius linked to, you'll find:

{$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}

AFAIK you have to add this to every unit in your program, but you can't remove the RTTI of the units included with Delphi (VCL and RTL). Some increase in the executable since is inevitable.

-- 
Regards
Jens
0
Utf
1/12/2010 10:47:25 AM
Valgardur Gudjonsson wrote:

> Thanks again, but I am looking for ways to disable the RTTI, not
> information on how to use it, to reduce the size of my executables.

I considere disable RTTI a information about the use of RTTI, a
knowledge.

> 
> I must admit, being a faithful Delphi user from the beginning, that
> this is very strange, adding RTTI which has no value for me (and I
> assume many other developers) which in turn more than triples the
> size of my exe files, this is on by default and no clear way to
> disable it.

It do not triple de size of your app, but surely make your app grow.



Cesar Romero
0
Cesar
1/12/2010 11:19:23 AM
Jens Mühlenhoff wrote:

> If you carefully read the page Marius linked to, you'll find:
> 
> {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}
> 
> AFAIK you have to add this to every unit in your program, but you
> can't remove the RTTI of the units included with Delphi (VCL and
> RTL). Some increase in the executable since is inevitable.

I've added this code to my default .inc file 


      { Minimal RTTI generation henceforth in this file }
      {$RTTI EXPLICIT METHODS([]) FIELDS([]) PROPERTIES([])}
      {$WEAKLINKRTTI ON}



Cesar Romero
0
Cesar
1/12/2010 11:21:35 AM
Bear in mind that the RTTI is not the only reason why your exe size has 
grown. With each release of Delphi, the exe size tends to get bigger because 
of an enhanced VCL and RTL.

To get the smallest possible size, you need to:

1. Recompile the RTL and VCL with disabled enhanced RTTI information. Create 
a dummy project which uses all the units of the RTL and VCL in its uses 
clause. Save the compiled units in a separate lib folder. Make sure that 
Delphi finds these dcus before it finds the officially compiled ones which 
have extra RTTI compiled in.

2. Compile your own project with disabled RTTI.

3. You may have to do additional work if you are using packages.

regards
Mike


<Valgardur Gudjonsson> wrote in message news:202163@forums.codegear.com...
>I have done searches on RTTI and Delphi 2010, a lot of information on how 
>to use it, but no information on how to disable it.
>
> Best wishes,
>
> Valgarður Guðjónsson
0
Mike
1/12/2010 11:51:53 AM
On Tue, 12 Jan 2010 02:47:01 -0800, Bob Swart <Bob@eBob42.com> wrote:

>Open your .dpr project file and add the following line *before* the uses 
>clause:
>
>{$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}
>
>That should shrink your executable size again.

Note that you have to *build* your project to see the change, just
compiling it won't do.


ain
0
ain
1/12/2010 12:37:21 PM
>
>      { Minimal RTTI generation henceforth in this file }
>      {$RTTI EXPLICIT METHODS([]) FIELDS([]) PROPERTIES([])}
>      {$WEAKLINKRTTI ON}

I tried that but at some point during compilation I get an error:

globaldefines.inc (13): F2084 Internal Error: AV05C6E814-R00000010-0

So I have to remove it again. It doesn't work :-(.

cu Christian
0
Christian
1/12/2010 2:31:27 PM
Christian Kaufmann wrote:

> >      {$RTTI EXPLICIT METHODS([]) FIELDS([]) PROPERTIES([])}
> >      {$WEAKLINKRTTI ON}
> 
> I tried that but at some point during compilation I get an error:
> 
> globaldefines.inc (13): F2084 Internal Error: AV05C6E814-R00000010-0
> 
> So I have to remove it again. It doesn't work :-(.

Working fine here, with all my projects.


Cesar Romero
0
Cesar
1/12/2010 2:34:29 PM
Valgardur Gudjonsson wrote:
> I must admit, being a faithful Delphi user from the beginning, that this is very strange, adding RTTI which has no value for me (and I assume many other developers) which in turn more than triples the size of my exe files, this is on by default and no clear way to disable it.

First of all, it does not triple the size of an exe.

Second, MANY developers were begging for more powerful RTTI. I 
personally know of developers who were practically forced to stop using 
Delphi because of key RTTI capabilities that were missing (until D2010).

Third, exe size is not important anymore, for a preponderance of 
developers. If you take the size of the hard drives necessary to simply 
install the OS's that Delphi targets, no Delphi-compiled app will be a 
problem. The only case where it could be a problem is for developers who 
make frequent updates to clients with extremely poor Internet connections.

The benefits of more powerful RTTI outweigh the negatives of larger 
exe's by several orders of magnitude. If you don't need it, simply 
minimize it's impact for your apps. But don't complain about such a 
major improvement in the product, because it will make it more 
successful, which will fund other things that are important to you.

Loren sZendre
0
Loren
1/12/2010 7:11:57 PM
> Second, MANY developers were begging for more powerful RTTI. I
> personally know of developers who were practically forced to stop using
> Delphi because of key RTTI capabilities that were missing (until D2010).
>
> Third, exe size is not important anymore, for a preponderance of
> developers. If you take the size of the hard drives necessary to simply
> install the OS's that Delphi targets, no Delphi-compiled app will be a
> problem. The only case where it could be a problem is for developers who
> make frequent updates to clients with extremely poor Internet connections.
>
> The benefits of more powerful RTTI outweigh the negatives of larger
> exe's by several orders of magnitude. If you don't need it, simply
> minimize it's impact for your apps. But don't complain about such a
> major improvement in the product, because it will make it more
> successful, which will fund other things that are important to you.

Not for me , size is #1 priority.
Even exe's compiled with D2009 are too large for me.

Paul
0
Paul
1/12/2010 7:25:12 PM
Paul Blommaerts wrote:
> Not for me , size is #1 priority.
> Even exe's compiled with D2009 are too large for me.

Well, that's what previous versions are for. You can never please 
everyone, but as stated before, vastly improved RTTI benefits far more 
people than it hampers, although options to strip out unneeded features 
are also appreciated.

Loren sZendre
0
Loren
1/12/2010 8:06:13 PM
Hello,

Paul Blommaerts wrote:

> Not for me , size is #1 priority.

may I ask what kind of software you're developing?

-- 
Moritz

"Hey, it compiles! Ship it!"
0
Moritz
1/12/2010 8:19:14 PM
Paul Blommaerts wrote:

>>The benefits of more powerful RTTI outweigh the negatives of larger
>>exe's by several orders of magnitude. If you don't need it, simply
>>minimize it's impact for your apps. But don't complain about such a
>>major improvement in the product, because it will make it more
>>successful, which will fund other things that are important to you.
>
>Not for me , size is #1 priority.
>Even exe's compiled with D2009 are too large for me.

Why Paul? Except for loading speed it really does not matter much
AFAICT.

They do get smaller with http://upx.sourceforge.net/ 
(but its kind of cheating <g>)
0
Marius
1/12/2010 8:20:25 PM
Marius . wrote:
> They do get smaller with http://upx.sourceforge.net/ 
> (but its kind of cheating <g>)

Yeah, I use it for some things. I like the tool.

Loren sZendre
0
Loren
1/12/2010 8:22:21 PM
I have tried this, at first not clear that it had to be every unit, and the placement not clear at all - before the uses clause.

Perhaps my problem is third party components, but it is more than some increase, it goes from 3.5Mb to 11.5 Mb..

I still cannot understand why this is introduced in version 2010 - default on, with poor documentation and such a huge side effect.

Best wishes,

Valgarður Guðjónsson
0
Valgardur
1/12/2010 8:41:13 PM
Sure how to disable RTTI is a knowledge, but one that should not be so hard to find, and fragile to use, at first I only got compiler errors, due to wrong placement. And remember this is just a new version, is on by default and no easy documentation on how to disable.

Surely, you must agree this could have been handled better?

My small / medium application grew from 3.5Mb to 11.5Mb, that is more than triple...

Best wishes,

Valgarður Guðjónsson
0
Valgardur
1/12/2010 11:58:54 PM
> {quote:title=Loren Szendre wrote:}{quote}
> Valgardur Gudjonsson wrote:
> > I must admit, being a faithful Delphi user from the beginning, that this is very strange, adding RTTI which has no value for me (and I assume many other developers) which in turn more than triples the size of my exe files, this is on by default and no clear way to disable it.
> 
> First of all, it does not triple the size of an exe.
> 
> Second, MANY developers were begging for more powerful RTTI. I 
> personally know of developers who were practically forced to stop using 
> Delphi because of key RTTI capabilities that were missing (until D2010).
> 
> Third, exe size is not important anymore, for a preponderance of 
> developers. If you take the size of the hard drives necessary to simply 
> install the OS's that Delphi targets, no Delphi-compiled app will be a 
> problem. The only case where it could be a problem is for developers who 
> make frequent updates to clients with extremely poor Internet connections.
> 
> The benefits of more powerful RTTI outweigh the negatives of larger 
> exe's by several orders of magnitude. If you don't need it, simply 
> minimize it's impact for your apps. But don't complain about such a 
> major improvement in the product, because it will make it more 
> successful, which will fund other things that are important to you.
> 
> Loren sZendre

Well going from 3.5Mb to 11.5Mb is more than triple.

Although it is true in most cases that size is not critical, it matters on some occasions, and 8Mb of extra file size is really too much...

I have no problem with RTTI, I understand it can be powerful / useful / even necessary and why it was included.

I'm just complaining about lack of proper documentation and lack of easier disabling methods.

Best wishes,

Valgarður Guðjónsson



Best wishes,
0
Valgardur
1/13/2010 12:06:14 AM
Valgardur Gudjonsson wrote:
> Sure how to disable RTTI is a knowledge, but one that should not be so hard to find, and fragile to use, at first I only got compiler errors, due to wrong placement. And remember this is just a new version, is on by default and no easy documentation on how to disable.
> Surely, you must agree this could have been handled better?

Yes, it would be nice to have a help topic showing all the details, 
techniques and ramifications of how to turn it off, as a whole, or piece 
by piece.

> My small / medium application grew from 3.5Mb to 11.5Mb, that is more than triple...

You have not stated from which version of Delphi. That is critical.

A tripling of the size is NOT explained by RTTI. RTTI might account for 
10% of it. You haven't provided enough information for anyone to help 
explain it.

Loren sZendre
0
Loren
1/13/2010 12:09:21 AM
Loren Szendre wrote:

> > My small / medium application grew from 3.5Mb to 11.5Mb, that is
> > more than triple...
> 
> You have not stated from which version of Delphi. That is critical.
> 
> A tripling of the size is NOT explained by RTTI. RTTI might account
> for 10% of it. You haven't provided enough information for anyone to
> help explain it.

+1


Cesar Romero
0
Cesar
1/13/2010 12:28:25 AM
Valgardur Gudjonsson wrote:

> Although it is true in most cases that size is not critical, it
> matters on some occasions, and 8Mb of extra file size is really too
> much...

Are you sure that you have the same compiler settings?  That is a
/huge/ jump relative to what should happen with the addition of RTTI.

-- 
Nick Hodges
Delphi Development Manager
Embarcadero Technologies
0
Nick
1/13/2010 12:55:04 AM
Nick Hodges wrote:
> Valgardur Gudjonsson wrote:
> 
>> Although it is true in most cases that size is not critical, it
>> matters on some occasions, and 8Mb of extra file size is really too
>> much...
> 
> Are you sure that you have the same compiler settings?  That is a
> /huge/ jump relative to what should happen with the addition of RTTI.
> 

Didn't someone mention that if you use a generic class in multiple 
units, each unit gets its own "copy" of that generic class? Combined 
with the RTTI overhead, could that explain the increase?

Sorry, I cannot find the reference for the generic issue; it's probably 
in QC.

Michael
0
Michael
1/13/2010 3:49:17 AM
Hi Valgardur,

> Well going from 3.5Mb to 11.5Mb is more than triple.

Are you compiling a RELEASE or a DEBUG version? (check the Project 
Manager, open up the Build Configurations node, and make sure Release is 
selected instead of Debug). You may actually add several MBs of debug 
information to your executable...

> Valgarður Guðjónsson

Groetjes,
           Bob Swart

-- 
Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
President Delphi section Software Development Netherlands: www.sdn.nl
Embarcadero Technology Partner - Delphi & RAD Studio Reseller BeNeLux
Delphi Win32 & .NET books on Lulu.com: http://stores.lulu.com/drbob42
Personal courseware + e-mail support http://www.ebob42.com/courseware
Blog: http://www.drbob42.com/blog - RSS: http://eBob42.com/weblog.xml
0
Bob
1/13/2010 7:38:14 AM
Valgardur Gudjonsson wrote:

> Perhaps my problem is third party components, but it is more than
> some increase, it goes from 3.5Mb to 11.5 Mb..

That sounds more like you accidentally switched on TD32 debug info. See
Project -> Options -> Linking -> Debug information.

-- 
Pieter

"Write a wise word and your name will live forever."
 -- Anonymous
0
Pieter
1/13/2010 10:55:17 PM
> {quote:title=Pieter Zijlstra wrote:}{quote}
> Valgardur Gudjonsson wrote:
> 
> > Perhaps my problem is third party components, but it is more than
> > some increase, it goes from 3.5Mb to 11.5 Mb..
> 
> That sounds more like you accidentally switched on TD32 debug info. See
> Project -> Options -> Linking -> Debug information.


That would be my guess too
0
Marco
1/14/2010 9:06:53 PM
Christian Kaufmann wrote:

> >
> >      { Minimal RTTI generation henceforth in this file }
> >      {$RTTI EXPLICIT METHODS([]) FIELDS([]) PROPERTIES([])}
> >      {$WEAKLINKRTTI ON}
> 
> I tried that but at some point during compilation I get an error:
> 
> globaldefines.inc (13): F2084 Internal Error: AV05C6E814-R00000010-0
> 
> So I have to remove it again. It doesn't work :-(.

There is a bug if $RTTI is used before the uses section of a unit.
Include your globaldefines.inc after uses sections in order to fix this.

The syntax uses sets ([]) of a type defined in System.pas, but the type
can't be linked to too early.

-- Barry

-- 
http://barrkel.blogspot.com/
0
Barry
1/24/2010 3:09:59 AM
>There is a bug if $RTTI is used before the uses section of a unit.
>Include your globaldefines.inc after uses sections in order to fix this.

Oh no! You tell me I'll have to change several hundred units for that
now?

If I add {$RTTI EXPLICIT METHODS([]) FIELDS([]) PROPERTIES([])} in the
..dpr after the program ....; It does work. 
Is this a workarround that should affect all my other units?

cu Christian
0
Christian
1/24/2010 3:18:08 PM
Christian Kaufmann wrote:

> Oh no! You tell me I'll have to change several hundred units for that
> now?

I'm not telling you what you have to do.

-- Barry

-- 
http://barrkel.blogspot.com/
0
Barry
1/24/2010 6:56:42 PM
I have the same problem.

Updating my application from D2007 to D2010, his file size has grown from 15Mb to 30Mb.

Adding {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])} at .dpr project had an small effect, file sizes has only shrink to 27Mb.

Selecting Release instead of Debug in Build Configurations Node at Project Manager has any effect at all, I get same sizes in both modes. ¿ Is that normal ?

¿ There is no way to reduce this size ?, ¿ I will have to carry it ? (I do a lot of updates through Internet).

Thank you.
0
Marc
2/24/2010 10:00:17 PM
On 24.02.2010 23:00, Marc Guillot wrote:

> Adding {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])} at .dpr project had an small effect, file sizes has only shrink to 27Mb.

As far as I know, these directives have to be added to every unit of the 
project.

Hope this helps,
-- 
Michael Justin
SCJP, SCJA
betasoft - Software for Delphi™ and for the Java™ platform
http://www.mikejustin.com - http://www.betabeans.de
0
Michael
2/24/2010 10:02:25 PM
Thanks for you help.

> > Adding {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])} at .dpr project had an small effect, file sizes has only shrink to 27Mb.
> 
> As far as I know, these directives have to be added to every unit of the 
> project.
> 
> Hope this helps,

I have read that RTI new oversize is about 10% of executable size, so it appears I won't be able to further reduce file size here.

But I was expecting to shrink some Mb using Release Build Configuration, ¿ do you know how can I get the same file sizes in both Debug and Relase Build Configurations ?, something must be wrong.

PS: I have upgraded the project file from my previous D2007 project, maybe their .dpr .dproj options are not the best ones for D2010 (I will try to creating a new blank project from D2010 IDE).
0
Marc
2/24/2010 10:19:14 PM
Marc Guillot wrote:
> I have read that RTI new oversize is about 10% of executable size, so it appears I won't be able to further reduce file size here.

Have you tried UPX? It's free and radically reduces exe size, as well as 
making it harder to reverse engineer your exe. I use it quite a bit.

Loren sZendre
0
Loren
2/24/2010 11:10:38 PM
Marc Guillot wrote:

> I have the same problem.
> 
> Updating my application from D2007 to D2010, his file size has grown
> from 15Mb to 30Mb.
> 
> Adding {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])} at .dpr
> project

It should be added to every unit for which RTTI is not required.
-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"When you are content to be simply yourself and don't compare
 or compete, everybody will respect you."
 -- Lao tzu
0
Rudy
2/25/2010 1:03:40 AM
Marc Guillot wrote:

> Thanks for you help.
> 
> > > Adding {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])} at
> > > .dpr project had an small effect, file sizes has only shrink to
> > > 27Mb.
> > 
> > As far as I know, these directives have to be added to every unit
> > of the project.
> > 
> > Hope this helps,
> 
> I have read that RTI new oversize is about 10% of executable size, so
> it appears I won't be able to further reduce file size here.

That's roughly what I get as well.
> 
> But I was expecting to shrink some Mb using Release Build
> Configuration, ¿ do you know how can I get the same file sizes in
> both Debug and Relase Build Configurations ?, something must be wrong.

Make sure that TD32 debug is switched off ...

"That sounds more like you accidentally switched on TD32 debug info. See
Project -> Options -> Linking -> Debug information."
 
> PS: I have upgraded the project file from my previous D2007 project,
> maybe their .dpr .dproj options are not the best ones for D2010 (I
> will try to creating a new blank project from D2010 IDE).

If the above didn't help, do you have lot of resources (bitmaps,
imagelists, etc) in your forms (dfm files)?

-- 
Pieter

"Ah well, then I suppose I shall have to die beyond my means." 
 -- Oscar Wilde, dying words
0
Pieter
2/25/2010 2:11:39 AM
Rudy Velthuis (TeamB) wrote:

> Marc Guillot wrote:
> 
> > I have the same problem.
> > 
> > Updating my application from D2007 to D2010, his file size has grown
> > from 15Mb to 30Mb.
> > 
> > Adding {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])} at
> > .dpr project
> 
> It should be added to every unit for which RTTI is not required.

Maybe one should, but for the moment there is a bug in the compiler
with a side effect, causing placing the above line in the dpr file
to switch off RTTI for "all" units (except for the RTL/VCL), also see:

https://forums.embarcadero.com/thread.jspa?messageID=212435&tstart=0#212435

-- 
Pieter

"The way to find what the mainstream will do tomorrow is to
 associate with the lunatic fringe today."
 -- Jean-Louis Gassee

Edited by: Pieter Zijlstra on Feb 25, 2010 3:21 AM
0
Pieter
2/25/2010 2:22:12 AM
> > But I was expecting to shrink some Mb using Release Build
> > Configuration, ¿ do you know how can I get the same file sizes in
> > both Debug and Relase Build Configurations ?, something must be wrong.
> 
> Make sure that TD32 debug is switched off ...
> 
> "That sounds more like you accidentally switched on TD32 debug info. See
> Project -> Options -> Linking -> Debug information."

No, it is disabled. If I enable it, file size grows from 30Mb to 52Mb.

> > PS: I have upgraded the project file from my previous D2007 project,
> > maybe their .dpr .dproj options are not the best ones for D2010 (I
> > will try to creating a new blank project from D2010 IDE).
> 
> If the above didn't help, do you have lot of resources (bitmaps,
> imagelists, etc) in your forms (dfm files)?

Not specially, I basically have only bitmaps in TSpeedButtons, because they can't use Images from an ImageList. I also have an ImageList in every Form, but it is inherited from a parent form, and usually has no changes (in a few forms it can have some additional images).

This project, with no changes, takes only 15Mb in Delphi2007 (the only change I have done in Delphi2010 is upgrading to the latests versions of Developer Express and Fast Reports).

I thought there is something wrong in my .dproj file (because I have upgraded it from Delhphi2007), so I have created a new blank project using D2010 IDE, and I have added it all my forms. But I get the same file size, so there is nothing wrong in my Project options, they are all the default ones. (I still get the same file size using Debut or Release Build Configurations, ¿ thats normal ?).

Thanks for your help.
0
Marc
2/25/2010 10:44:39 PM
Marc Guillot wrote:

> > > But I was expecting to shrink some Mb using Release Build
> > > Configuration, ¿ do you know how can I get the same file sizes in
> > > both Debug and Relase Build Configurations ?, something must be
> > > wrong.
> > 
> > Make sure that TD32 debug is switched off ...
> > 
> > "That sounds more like you accidentally switched on TD32 debug
> > info. See Project -> Options -> Linking -> Debug information."
> 
> No, it is disabled. If I enable it, file size grows from 30Mb to 52Mb.

Well, that sounds "normal".

Just out of curiosity how many lines of code are in this project?
 
> > > PS: I have upgraded the project file from my previous D2007
> > > project, maybe their .dpr .dproj options are not the best ones
> > > for D2010 (I will try to creating a new blank project from D2010
> > > IDE).
> > 
> > If the above didn't help, do you have lot of resources (bitmaps,
> > imagelists, etc) in your forms (dfm files)?
> 
> Not specially, I basically have only bitmaps in TSpeedButtons,
> because they can't use Images from an ImageList. I also have an
> ImageList in every Form, but it is inherited from a parent form, and
> usually has no changes (in a few forms it can have some additional
> images).
> 
> This project, with no changes, takes only 15Mb in Delphi2007 (the
> only change I have done in Delphi2010 is upgrading to the latests
> versions of Developer Express and Fast Reports).

It would be interesting to know if the OP (Valgadur Gudjonsson) also
uses one of these component sets (or maybe another component set you
both have in common).
 
> I thought there is something wrong in my .dproj file (because I have
> upgraded it from Delhphi2007), so I have created a new blank project
> using D2010 IDE, and I have added it all my forms. But I get the same
> file size, so there is nothing wrong in my Project options, they are
> all the default ones. (I still get the same file size using Debut or
> Release Build Configurations, ¿ thats normal ?).

That depends on the settings you have in the Debug and Release build
configurations, but IIRC using the default Debug and Release settings
the size of the executable is not effected.

-- 
Pieter

"The most overlooked advantage of owning a computer is that if
 they foul up there's no law against whacking them around a bit." 
 -- Eric Porterfield
0
Pieter
2/26/2010 12:20:25 AM
> This project, with no changes, takes only 15Mb in Delphi2007 (the
> only change I have done in Delphi2010 is upgrading to the latests
> versions of Developer Express and Fast Reports).

If you let the Developer Express libraries add their skin support, that
adds a lot to the size. Grep for 'skin' in your units.


-- 
Eivind Bakkestuen [NDD]
Nexus Database Systems
0
Eivind
2/26/2010 6:38:55 AM
> {quote:title=Eivind Bakkestuen wrote:}{quote}
> > This project, with no changes, takes only 15Mb in Delphi2007 (the
> > only change I have done in Delphi2010 is upgrading to the latests
> > versions of Developer Express and Fast Reports).
> 
> If you let the Developer Express libraries add their skin support, that
> adds a lot to the size. Grep for 'skin' in your units.
> 
> 
> -- 
> Eivind Bakkestuen [NDD]
> Nexus Database Systems

Thanks Eivind, I wasn't using skins in D2007, but with latest DevExpress they have added automatically.

I will investigate how to remove them (everytime I save a Form it adds Skins units) and recompile.

Thanks again.
0
Marc
2/26/2010 9:52:46 AM
> > > This project, with no changes, takes only 15Mb in Delphi2007 (the
> > > only change I have done in Delphi2010 is upgrading to the latests
> > > versions of Developer Express and Fast Reports).
> > 
> > If you let the Developer Express libraries add their skin support, that
> > adds a lot to the size. Grep for 'skin' in your units.
> 
> Thanks Eivind, I wasn't using skins in D2007, but with latest DevExpress they have added automatically.
> 
> I will investigate how to remove them (everytime I save a Form it adds Skins units) and recompile.

Fine, now I have an executable file size slightly below 20Mb, that was my maximum target.

I have recovered 10Mb removing RTTI information and Skins units.

Thanks to all.
0
Marc
2/26/2010 10:29:23 AM
Reply:

Similar Artilces:

Delphi XE / Delphi 2010
Hello! I noticed that Embarcadero® Delphi® 2010 Version is not on the list of products on Embarcadero page. Or is it still possible to buy it? Will RAD Studio XE compile programs written in Delphi 2010 without problems.? Thanks. Am 13.09.2010 09:04, schrieb Petra Nemec: > Will RAD Studio XE compile programs written in Delphi 2010 without problems.? As always you will probably have to recreate the projects as the import is still a bit -- special. Christian Hello! Does anybody know if it is still possible to get a Delphi2010 trial version (if yes where)? ...

from delphi 6 to delphi 2010
Hi. It is possible, with component RX, dxforumlibrary, InfoPower3000Pro, StringAlignGrid. Accepts communication BDE. Thank by comments. excequiel arostica wrote: >Hi. > It is possible, with component RX, dxforumlibrary, >InfoPower3000Pro, StringAlignGrid. Accepts communication BDE. > >Thank by comments. Rx is dead and sources are taken over by jcl/jvcl. I dont know about the rest of the components and i have no experiences with bde over the last 9 years. excequiel arostica wrote: > Hi. > It is possible, with component RX, dxforumlibrary,...

Price of upgrade from Delphi 2010 Professional to Delphi 2010 Enterprise?
It's weird, but I could not find the answer on so simple question not in Embarcadero Shop, neither by the forum search. For example, the shop info about Enterprise upgrade says: The Upgrade product is available to registered owners of 2006-2009 versions, blah-blah... So, if I'm Delphi 2010 Professional user, I even not eligible for upgrade? I have to buy a new version of Enterprise??? But if I'm Delphi 2006 Professional user, I can upgrade. Please clarify this nonsense for me. Exact question is in the subject. Thanks! Hi Dmitri, > It's weird, but I could not...

Using Delphi 7 and Delphi 2010
I had a project in Delphi 7. I worked on it in Delphi 2010. When I try to open the .dpr again in Delphi 7, the IDE toolbar widens across both monitors, and Delphi 7 locks up. It appears that Delphi 2010 modifies the .dpr in a way that makes Delphi 7 unable to open it again. All my forms & units appear to open fine in D7 after D2010, except for the warnings on the ExplicitHeight and ExplicitWidth properties being missing... I can easily recreate the .dpr, but is this expected behavior? Thanks. Tom Field wrote: > I had a project in Delphi 7. > > I worked o...

Delphi 2010 professional to Delphi XE3
Hello, Sorry for this is not right place to ask this question: I have Delphi 2010 professional version, I like to upgrade to Delphi XE3 Am eligible to upgrade or no not? I like answer from Delphi sales team. I couldn’t find email to ask them. Thanks Mike Thomas <> wrote in news:506459@forums.embarcadero.com: > Hello, > > Sorry for this is not right place to ask this question: > I have Delphi 2010 professional version, I like to upgrade to Delphi > XE3 Am eligible to upgrade or no not? I like answer from Delphi > sales team. I couldn’t find emai...

Delphi 2010 w Delphi 2007
I have D2007 installed on my laptop (XP sp3 running on dual core Athlon). Can I install D2010 on this machine without it affecting D2007? Will D2010 affect D2007 in any way? Thanks, Randall Carpenter > {quote:title=Randall Carpenter wrote:}{quote} > I have D2007 installed on my laptop (XP sp3 running on dual core Athlon). > Can I install D2010 on this machine without it affecting D2007? Will D2010 > affect D2007 in any way? Won't hurt a thing. I have D7, RAD Studio 2007, RAD Studio 2009, and RAD Studio 2010 all on my desktop system and they coexist fine. Jus...

Migrating From Delphi 7 to Delphi 2010
We did not know which forum was the best for this question. We have been wanting to migrate from Delphi 7 to a later version for years but it appears to be a daunting task. We first looked at D2006 and that was a radical new world. We bought D2010 a couple of years ago and not done much with it because there are so many parts to our applications. We have done a few new applications in D2010 and they seem to work okay. D2010 has not been impressive, perhaps because of the strangeness compared to D7. Is is possible for us to do a phased sort of migration where we do a form at a time? ...

Migrate from Delphi 2007 to Delphi 2010
Hi All, Thanks in advance for your help. Below is my query, Currently I am using Delphi 2007 and i want to migrate to Delphi 2010. 1. What all things i need to take care while doing this? 2. What all third party components will get impacted? 3. Any known issues in Delphi 2010 which might impact the cause? 4. Any changes in database operation required as i am using Oracle? Hope I have post this query under correct category. If not sorry for the trouble and could you please suggest me the correct category for this? Looking forward for your response. Have a great day. Th...

delphi 2006 code in delphi 2010
hello, is there any option to make delphi 2006 code work in delphi 2010? something like in java IDEs where you can define the code level you like to use? the problem is, that i made a project with 2006 and sent it to my customer. they got 2010 and it compiles fine, but it just doesn't work. it deals with en-/decryption of text, we assumed, that it has something to do with ansi vs. unicode strings... but we cant find the exact position where the error occurs. i am a bit dissapointed, because everywhere i read that the new IDE will always be downwards compatible and so on.. but in ...

Free RAD Studio 2010 and Delphi Prism 2011 with purchase of Delphi 2010
Hi All, For those of you who complain that Delphi (and RAD Studio) is too expensive... for a few short weeks there are two overlapping special offers from Embarcadero that you can use to move up to RAD Studio 2010 including the latest Delphi Prism 2011 for the price of a single Delphi 2010 (New User or Upgrade)... The first "RAD Studio PROMO" offer is still valid until June 28th: when you order Delphi 2010, you get RAD Studio 2010 delivered instead (including Delphi 2010, C++Builder 2010 and Delphi Prism 2010). As of May 26th, the "Delphi Prism 2011" of...

Size of Delphi executable
How can Delphi executables be made smaller? Consider the following. Create a new VCL app. Add a Label to the form. Compile. Sizes for the executable are as follows. Delphi 5 298,496 XE3 Debug 10,911,711 XE3 Release 2,283,520 Clearly there is a lot of unnessary bloat here. What is going on? How can it be minimized? Alan wrote: > Clearly there is a lot of unnessary bloat here. What is going on? This has been discussed over and over and over with every new version that gets released. Please search through past discussions for details. -- ...

Delphi 7 to Delphi 2010
We have decided to move up some applications running under Delphi 7 to Delphi 2010. However, I was surprise to see that simply recompiling the application causes the application to be much slower than version 7. We have a lot of string transformation routines, some mathematical transformations, etc. When I mean slower, I mean up to two times slower than with Delphi 7, so it not a minor difference. (The EXE is also a lot bigger but I don't worry too much about that). Is there something I can do to obtain the same kind of speed I had in Delphi 7 but with Delphi 2010? ...

package conversion from Delphi 5 to Delphi 2010
Hello, I am evaluating 2010 to convert a delphi 5 app up. My first task is to convert some custom control packages. My requires statment looks like this: requires vcl50, Vclx50, VclSmp50, Vcldb50, vcljpg50, What are the delphi 2010 equivalents if any? Is there documentation that I could look at to help with the conversion process? Thanks.. ...Joe.. joe alaimo wrote: > requires > vcl50, > Vclx50, > VclSmp50, > Vcldb50, > vcljpg50, 140 is the 2010 version. > > What are the delphi 2010 equivalents if any? Is t...

Pchar for PansiChar
hello, I use a DLL developed in D7 and not have the same sources. I will use Delphi 2010 and the functions do not work function TkmInitialize(LOGXMLDIR: PChar; TkmByExt: dWord): dWord; stdcall; external 'trackbuffer.dll'; function TkmCreateStream(FileName: PChar; Var Stream: dWord; Var Error: dWord): PChar; stdcall; external 'trackbuffer.dll'; function TkmLogEnd(Stream: dWord; MediaDuration, MediaPosition, MediaType: dWord; MediaName: PChar): dWord; stdcall; external 'trackbuffer.dll'; function TkmIsTkm(FileName: PChar): Bool; stdcall; external 'trackbuffer.dl...

Web resources about - Delphi 2010 executable size increase - embarcadero.delphi.non-tech

Executable - Wikipedia, the free encyclopedia
... . However, in a more general sense, a file containing instructions (such as bytecode ) for a software interpreter may also be considered executable ...

The Care and Feeding of Weird Machines Found in Executable Metadata [29c3] - YouTube
The Care and Feeding of Weird Machines Found in Executable Metadata The Executable and Linkable Format (ELF) is omnipresent; related OS and library ...

Agile Test Case Management – Specifications and Executable Specifications
... from the first three posts in this series and we’re well into realm of dangerous with Specification and their automated compatriots, Executable ...

Should You Recompile Your Software as a 64-Bit Executable?
Describes the 64-bit features available in OS X. As a general rule, in OS X v10.7 and later, the answer is probably yes. A 64-bit executable ...

For a year, gang operating rogue Tor node infected Windows executables
... Tor exit node. F-Secure Three weeks ago, a security researcher uncovered a Tor exit node that added malware to uncompressed Windows executables ...

Easily create icons from images or executables
... There is an easy solution to this problem, though, and it’s called Quick Any2Ico . Point this compact free program at an image or executable ...

Analysis Nirvana Via Stripped Executables and Binaries?
CodeSonar for binaries identifies security vulnerabilities in third-party executables

AMD’s GPU performance under Linux can be boosted by renaming certain executables
A new report claims that CS:Go players with AMD Radeon GPUs on Linux can boost performance significantly by renaming files.

Patent US5432937 - Method and apparatus for architecture independent executable files - Google Patents ...
The present invention is a method that enables single release of applications for multiple architectures and operating systems and to provide ...

pefile - pefile is a Python module to read and work with PE (Portable Executable) files - Google Project ...
pefile is a multi-platform Python module to read and work with Portable Executable (aka PE) files . Most of the information in the PE Header ...

Resources last updated: 1/23/2016 6:03:30 AM