[lazarus] small improvement of register + need statistic

Andrew Johnson acjgenius at earthlink.net
Mon Sep 15 10:52:14 EDT 2003

Well. please don't use html in your e-mails unless its actually needed :)

But how did you compile your app? Static, Dynamic or smart linking? From my experiance Smart Linking can give similar sizes as Delphi(if you are willing to wait for the extra compiling time), but the interfaces add extra overhead, while Dynamic is quite a bit larger then Delphi(dependent on what is being used and linked etc) eg. on this system, my DB test app with GTK1 -

FPC Dynamic Linking 3mb

FPC Smart Linking 800kb

Delphi 4 - 500kb

but a basic app without interface -

FPC Dynamic Linking -  300kb

FPC Smart Linking - 88kb

Delphi 4 -75kb

In other words, you can get far better results with smart linking, but don't expect GUI apps to be the same size. That is part of the price for supporting multiple interfaces(win32, gtk1, gtk2, gnome, etc)  the additional code to abstract interfaces, also means that the lcl cannot be optimized for every interface, while the VCL is only Win32 and thus can be quite a bit less overhead.

Once we get dynamic packages we could do the same thing theoretically and put the interfaces in there own package, and have apps link to it like any other lib, which would remove the overhead from apps themselves, and should make the numbers more consistant.

For better comparison you might compare Kylix to Delphi etc.(and include the size of the qt interface library), I think you'll finder similar size overhead.


-----Original Message-----
From: o2 <madarzoo at o2.pl>
Sent: Sep 15, 2003 10:14 AM
To: lazarus <lazarus at miraclec.com>
Subject: [lazarus] small improvement of register  + need statistic

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<META http-equiv=Content-Type content="text/html; charset=iso-8859-2">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2><FONT face="Times New Roman" 
size=3> </font><FONT face=Arial><FONT size=2>Hi</font></font>
<P style="MARGIN-BOTTOM: 0cm"><FONT face=Arial><FONT size=2>I try to recompile 
small program originally write for Delphi</font></font></p>
<P style="MARGIN-BOTTOM: 0cm"><FONT face=Arial><FONT size=2>And I found not 
necessary unit Controls used in REGISTRY</font></font></p>
<P style="MARGIN-BOTTOM: 0cm"><FONT face=Arial><FONT size=2>and second problem: 
the same program compile under :</font></font></p>
<P style="MARGIN-BOTTOM: 0cm"><FONT size=2><FONT face=Arial>Delp</font></font>hi 
3.0 and size of EXE is 79kB</p>
<P style="MARGIN-BOTTOM: 0cm">Delphi 6.0 - EXE=144kB</p>
<P style="MARGIN-BOTTOM: 0cm">FCP 1.1 + lazarus = 300kB</p>
<P style="MARGIN-BOTTOM: 0cm"><BR></p>
<P style="MARGIN-BOTTOM: 0cm">where I found statistic of using modules in  
<P style="MARGIN-BOTTOM: 0cm"> </p>
<P style="MARGIN-BOTTOM: 0cm">Darek</p></font></div></body></html>

More information about the Lazarus mailing list