On Thu, 11 May 2006 13:36:23 -0600
L505 <[EMAIL PROTECTED]> wrote:

>[...]
> > > There are advantages and disadvantages of using real code versus using
> > > DFM files. DFM files are a cleaner format than actual Pascal code.
> > > Real code is easier to peak into and copy/paste than DFM files (but a
> > > DFM to code converter can be made). DFM files make the exe bigger in
> > > size than run time code, generally speaking.
> >
> > DFM make the exe smaller. It is the streaming code, that needs quite a
> > lot of code. But this is a rather fixed amount. So for big applications
> > or if the library is in a .dll/.so the DFM mke the exe smaller.
> 
> You say DFM make the exe smaller, period. But you should say - DFM make
> the exe smaller in some cases only. :))))
>
> Because I've never seen a DFM exe smaller than a non-DFM exe myself, but
> I'll take your word for it. All the applications on my hard drive are
> several small and only some medium size programs - I make a lot of small
> utilities with only 1-5 forms in them. I don't make many large
> applications that exist all inside one exe - most of the time I make a
> bunch of small programs - then if I have one large program where I think a
> small add-on would be useful, I make a plug in system.  So it depends what
> the threshold is where the DFM does make the EXE smaller, I guess. If it
> requires that 5-10MB exe size exist before you start seeing gains in exe
> size - that doesn't really affect me.. with the work I do. I generally
> like to make the program have a plug-in system once it gets that large
> anyway, so it would actually be more advantageous for me to have a lower
> threshold.
> 
> Do you know generally what the threshold is before you have seen the exe
> become smaller from using DFM? 5MB? 6MB?

This depends on how you are doing the non DFM part. For example setting
'Left' to 30 needs 9 bytes in DFM. OTOH for a pascal statement
'AControl.Left:=30' the compiler creates code to push the integer on the
stack and call the SetLeft method, which certainly needs more than 9 bytes,
but I never measured if this is 2 times or 10 times as much on average. 

 
> Lazarus is quite a nice and big application and is only 6MB. I would think
> lazarus would be maybe 10MB in size, but it is only 6MB. So maybe we are
> seeing the threshold kick in here?

The IDE contains all components and does not use half of them.


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to