Page 2 of 5

Posted: 2010-08-06, 14:58 UTC
by Lefteous
My latest Unicode program in C was 4 KB where 2 KB are version information :D

Posted: 2010-08-07, 15:35 UTC
by Egh
Lefteous wrote:My latest Unicode program in C was 4 KB where 2 KB are version information :D
Yeah, but I guess that was a console application? You definitely were not linking entire Delphi VCL with unicode :)

Posted: 2010-08-07, 16:07 UTC
by MVV
I think it was normal C/C++ application that was linked w/o static CRT (static CRT adds about 50-100 KB for empty application or library).
My tools that doesn't use CRT at all have similar size (e.g. in my signature). :)

Delphi 3 adds about 180 KB for empty form, Delphi 2 I think even less.

Posted: 2010-08-07, 16:25 UTC
by Egh
MVV wrote:I think it was normal C/C++ application that was linked w/o static CRT (static CRT adds about 50-100 KB for empty application or library).
My tools that doesn't use CRT at all have similar size (e.g. in my signature). :)

Delphi 3 adds about 180 KB for empty form, Delphi 2 I think even less.
Taht's the point, 2010 would be closer to 1mb for an empty form. Unicode VCL does come at a price! :)

Posted: 2010-08-07, 16:56 UTC
by Lefteous
2Egh
Yeah, but I guess that was a console application? You definitely were not linking entire Delphi VCL with unicode
No it's a Window application.

Why should anyone waste so much disk space? Real WInAPI is the sh**! Everyelse else are kid tools :D

Posted: 2010-08-07, 17:52 UTC
by Egh
Lefteous wrote:2Egh
No it's a Window application.

Why should anyone waste so much disk space? Real WInAPI is the sh**! Everyelse else are kid tools :D
Yeah, just remind me please how many windows messages an average application needs to process before even displaying it's main window ;)

Posted: 2010-08-07, 18:34 UTC
by MVV
Egh wrote:Yeah, just remind me please how many windows messages an average application needs to process before even displaying it's main window ;)
Only WM_INITDIALOG (optional) if it uses DialogBoxParam function to create dialog window. :D
Or WM_CREATE (optional), WM_DESTROY and WM_QUIT if it uses DefWindowProc in window procedure and CreateWindow[Ex] function to create window. But app will also need to register simple window class and message loop. Just to display window.

Some other messages may be needed to limit window size, to act on keyboard/mouse events etc.

Anyway, IMHO window management should take a little part of code for great apps.

Posted: 2010-08-07, 20:14 UTC
by Egh
MVV wrote:
Anyway, IMHO window management should take a little part of code for great apps.
That's the point, with VCL it takes none (i.e. programmers' code, as it is dealt with by VCL code already included)

Posted: 2010-08-07, 20:35 UTC
by MVV
But often this 'VCL code already included' eats much more code than true app's code...
In case of Delphi - e.g. because linker can't include only methods of class/object that are really usable in app... Add simple label (first) to form (w/o any settings) - size will grow by 5-10 KB.

Posted: 2010-08-07, 23:45 UTC
by Egh
MVV wrote:But often this 'VCL code already included' eats much more code than true app's code...
In case of Delphi - e.g. because linker can't include only methods of class/object that are really usable in app... Add simple label (first) to form (w/o any settings) - size will grow by 5-10 KB.
That is given of course. Thing is, in most cases you just don't bovver with that VCL code size. Makes programmer's life easier :)

Posted: 2010-08-08, 07:34 UTC
by MVV
Easier, of course, but I prefer to have 10 executables with size 100 KB each instead of 10 executables with size 1 MB each if they do the same thing. :wink:

Posted: 2010-08-08, 15:15 UTC
by ghisler(Author)
On Friday I finally managed to compile the entire TC with Lazarus (after a few weeks of hard work). It starts, but many functions still don't work correctly, mainly because Lazarus blocks the handling of all standard Windows messages like WM_PAINT by program methods. So there is still a lot of work ahead.

The size has grown from 3.5MB to 5.5MB with smart linking turned off. I haven't tried with Smart linking on yet. The Overhead of Lazarus is 2MB compared to Delphi 2. At least there seems to be no noticeable slowdown on my test machine (old Pentium III with 866MHz).

Posted: 2010-08-08, 16:41 UTC
by MVV
I think the main plus in LazarusTC is Unicode support by run-time library. So we shouldn't use own methods for that :)

Posted: 2010-08-08, 18:12 UTC
by Egh
MVV wrote:I think the main plus in LazarusTC is Unicode support by run-time library. So we shouldn't use own methods for that:)
And considerably cheaper than 2010 Delphi I suspect :))

But, to tell the truth, they did put a considerable effort to maximize backwards compatibility.

Posted: 2010-08-09, 05:35 UTC
by Lefteous
2ghisler(Author)
Thanks for the update. Keep up the the great work!
I guess you are already participating in the Lazarus forum to clarify the open questions:
http://www.lazarus.freepascal.org/index.php?action=forum