[Lazarus] Application.QueueAsyncCall()

Brad Campbell brad at wasp.net.au
Wed Jan 20 06:54:41 CET 2010

Hello Brad,

I'm also interested on this, and would like to contribute with some
thoughts. First, I have tried to remove all the debugln() and similar
calls from the LCL, but it's a lot of work manually... it's not as
simple as recursive search and replace. I have found that removing a
few of them reduces the .exe size a few kilobytes (compiling with
strip symbols), not much, but enough to be considered. Some objects
have custom debug routines implemented with loops, and text
formatting, which is time and space consuming. Many of the debug calls
are wrapped by compiler conditionals, but many of them are not. Also
compiler conditional differ from unit to unit, if a global debug
conditional were used enabling/disabling debug calls would be easier.
I have thought about creating an automatic tool to strip all debug
calls from the LCL (or to wrap them), but the task doesn't seem


2010/1/19 Brad Campbell <brad at wasp.net.au>:
> G'day all,
> Simple question. When I compile my applications against the lcl, is there an
> easy way to compile out all the various debugln() calls?
> I had a cursory look at lcl/lclproc.pas where they are defined, but nothing
> obvious jumped out at me. If the debugln() routines were re-defined to empty
> procedures, would the compiler optimise the calls away and not compile in
> all the text strings also?
> 2 Reasons for this. First is space. I was simply interested in seeing how
> much space this stuff consumed.
> Second is noise on the console when the applications are running. Synedit in
> particular is quite picky about its unicode characters, and can get quite
> noisy when invalid combinations are fed to it, although it appears to cope
> quite well.
> Regards,
> Brad
> --
> Dolphins are so intelligent that within a few weeks they can
> train Americans to stand at the edge of the pool and throw them
> fish.
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

More information about the Lazarus mailing list