On Fri, 4 Jan 2002, John Levon wrote:

> On Fri, Jan 04, 2002 at 02:26:46AM +0100, Lars Gullik Bjønnes wrote:
>
> > John Levon <[EMAIL PROTECTED]> writes:
> >
> > | actually we are going to get more bloated as more STL gets used and
> > | GUI-I progresses ...
> >
> > Does not compute.
>
> Well GUII has certainly added lots to the image.

Most of those extra classes are for MVC, which Asger argued could and
should be done for a single frontend port anyway.  There are several
new pimple classes and don't forget that the comparison was between
1.1.6 and 1.2.0cvs so there have also been a number of new features
added:  Herbert's TeXInfo stuff; the Mathed rewrite continues --
compact C-style pointer arithmetic replaced by bloated STL container
classes; etc. etc.

So seeing a change from 1.1.6fixcvs
        1724196

to 1.2.0cvs
        2121764

which is about 400kB.  Where did this size increase come from?
Both binaries compiled using -O and the only difference in compiler
flags is that 1.2.0cvs has -DXLIB_ILLEGAL_ACCESS= also added to aid
debugging Xlib-related faults (dual-head stuff). gcc-2.95.3 used for
both.

Let's take a look at some stripped library sizes:

1.2.0cvs  1.1.6fixcvs           which library
1707026     38866    ./frontends/.libs/libfrontends.a
 457480       n/a    ./frontends/controllers/.libs/libcontrollers.a
    800       772    ./frontends/support/.libs/libfrontendsupport.a
1083494    533780    ./frontends/xforms/.libs/libxforms.a
  30780     37430    ./graphics/.libs/libgraphics.a
 471354    495900    ./insets/.libs/libinsets.a
 510312    215156    ./mathed/.libs/libmathed.a
  97864     97932    ./support/.libs/libsupport.a

At first glance you could blame the frontend (GUII) for the bloat in
LyX stripped executable size.  But that would be too simple a
judgement.  The linking process has changed slightly between 1.1.6 and
1.2.0 with libraries from subdirs now being linked into the library of
the directy above. Previously, each subdirectory's library was used
directly (this is part of the reason for the longer compile times).

Anyway, this effectively means something like the following is more
correct (based on extrapolated sizes when combining subdir libraries):

1.2.0cvs  1.1.6fixcvs           Which library          Difference
1707026    624004    ./frontends/.libs/libfrontends.a   1083022
  30780     37430    ./graphics/.libs/libgraphics.a       -6650
 471354    495900    ./insets/.libs/libinsets.a          -24546
 510312    215156    ./mathed/.libs/libmathed.a          295156
  97864     97932    ./support/.libs/libsupport.a           -68

From the Difference column you see there has been a massive increase
in the size of the frontend but you should also remember that a lot of
dialogs have been moved from src/ to src/frontends/xforms/.  Also
remember that we have only 400kB increase in total.  It would seem
that Mathed is in fact responsible for a part of the increase in
executable size.  Finally, for sake of completeness, how much has the
size of all the stripped src/*.o files changed?  (adjusted to library
size)

1.2.0cvs    = 1626166
1.1.6fixcvs = 1629055
Difference      -2889

Files like buffer.o have changed from 96680 to 120840.  There are also
three additional object files in 1.2.0cvs.  Yet we removed a heap of
dialogs!  A file-by-file comparison is beyond the scope of this email
but further investigation may be necessary if this thread continues.

Can GUII really take all the blame?   No, I think not.
How about the majority of the blame?  No, I think not.
Some of the blame?   Well, maybe a little bit of the blame.
How about we blame MVC instead?  Yes, we'd do that for a single port anyway.
And STL + Mathed rewrite?  Yeah, blame that too.
Some other vague concepts?  Yeah, blame those too!

Can we do anything to fix this?

YES, add more features to hide the apparent bloat!
OR, rewrite LyX in terse C with hand-crafted, assembly-language ADT's
for extra speed.

Allan. (ARRae)  If only coding was this much fun!

Reply via email to