Mattias Gaertner wrote:

On Sat, 04 Mar 2006 17:16:46 +0100
darekM <[EMAIL PROTECTED]> wrote:

Mattias Gaertner napisa?(a):
On Sat, 04 Mar 2006 12:39:34 +0100
darekm <[EMAIL PROTECTED]> wrote:

Mattias Gaertner wrote:



Darek

PS.Can I comment all EventTrace (or IFDEFs) in gtkcallback.inc, they slowdown running.
Did you test that?
How much slower?


I've not test but I'm looking for not necessary lines of code

all LCL should follow directive RELEASE and should remove all DebugLN, assert and log

My application seems to be to slowly (compared to Delphi)

every switch between windows need remarkable time

And why you ask. Even if it need 0.01% time, we can do it on and off as
we need.
We could comment them and delete many of them. But deleting them means,
the next time we search a bug at this place, we have to add them again.
There are many functions where I commented and uncommented the debugging
code a douzand times. Eventually I learned, it saves a lot of time, to
keep some debugging code ready. Other libs like gtk do the same.
but I say IFDEF

Can you give an example?
{$DEFINE TraceEvent}

function gtkchangedCB( widget: PGtkWidget; data: gPointer) : GBoolean; cdecl;
var
 Mess : TLMessage;
begin
 if ComponentIsDestroyingHandle(TWinControl(Data))
 or (LockOnChange(PgtkObject(Widget),0)>0) then exit;
{$IFDEF TraceEvent}
 EventTrace('changed', data);
{$ENDIF}

 Mess.Msg := LM_CHANGED;
 DeliverMessage(Data, Mess);

 Result := CallBackDefaultReturn;
end;




Mattias

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to