Post by Mattias GaertnerWon't help. For example at the moment the gtk callbacks use case statements
with all kind of controls. This must be improved.
Post by Felipe Monteiro de CarvalhoLCL adds some things, like being able to load a form from XML. This
requires a parser, and parsers are big, so this adds size to software.
True. But this makes less than 5% of the code.
Post by Felipe Monteiro de CarvalhoThe final size is a big sum of all the features. A powerful
smartlinking would kill all unecessary stuff.
I know this isn't what everyone is really wanting to hear when they're
discussing this, but I'll add my $.02 USD into the discussion more from
an esoteric corporate view than a lazarus coding view.
I wrote TruckBytes using Lazarus. It's a full featured graphically
pleasing database application designed to run a trucking company. The
total download is around 2 MB compressed, including the SSL libraries I
redistribute.
An equivalent program written using Visual C++ in a Microsoft
environment would never see the light of day for less than 20 MB. The
database engine alone would probably be 3/4 of the total distributed
program. If done in VB, the runtimes for VB alone would be large. Sure
you could force your users to download it separately, but if you want to
reduce customer support issues you distribute everything you need.
Back to TruckBytes. The EXE is around 3.9 MB all said and done, plus
supporting SSL dll's for the Windows version. I have 200 GB of hard
disk space. I have 2 GB of RAM. I have 3 Mb download speed. If I was
a nut about trying to reduce EXE size I'd use a macro assembler and a
6502 processor (yes, I've done that before.)
"Bloat" used to be an issue in code when the code was pushing the limits
of what the computers could handle. Sure you can talk about "bloat"
like it's still a horrible problem, but when it comes down to it the
question is do I want to waste 4 months or more of development to reduce
code size or use some preconfigured "lego blocks" that produce a larger
EXE? I'll go for the 4 months of man-hours saved.
Of course that's a corporate view and really holds no bearing on the
discussion of how to reduce the LCL size, I just want to point out that
1 MB exe versus 4 MB exe really doesn't make a darn bit of difference
unless your computer was built in the mid 90's. Or you're simply
writing a console app, in which case you shouldn't use the LCL anyway.
Keep in mind I'm not saying use this to justify NOT optimizing the LCL
or smartlinking. I'm just saying weigh the time spent coding where it's
best utilized, for instance GTK2, QT, OSX, better compatibility or bug
squishing.
The above statement's obviously don't apply if you're writing for
PocketPC / Windows Mobile.
-Tony