Re: [twsocket] TIcsLogger.DoDebugLog optimization

2010-08-25 Thread Arno Garrels
Anton, >> I do not think that people use multiple log destinations at the >> same time. Currently the string is allocated and concatenated >> only when actually required. >> > But it's possible. My modification is more compact also. Yes it is possible but rather unlikely IMO. >> This is non-opti

Re: [twsocket] TIcsLogger.DoDebugLog optimization

2010-08-25 Thread Anton S.
Arno, >I do not think that people use multiple log destinations at the >same time. Currently the string is allocated and concatenated >only when actually required. But it's possible. My modification is more compact also. >This is non-optimal as well. >You always concatenate and allocate the strin

Re: [twsocket] TIcsLogger.DoDebugLog optimization

2010-08-25 Thread Arno Garrels
Anton, > TIcsLogger.DoDebugLog uses non-optimal algorithm dealing with > timestamps: it is being added to Msg three times. I do not think that people use multiple log destinations at the same time. Currently the string is allocated and concatenated only when actually required. > I suggest chang

[twsocket] TIcsLogger.DoDebugLog optimization

2010-08-25 Thread Anton S.
TIcsLogger.DoDebugLog uses non-optimal algorithm dealing with timestamps: it is being added to Msg three times. I suggest change the code as following: procedure TIcsLogger.DoDebugLog( Sender : TObject; LogOption : TLogOption; Msg : String); // remove const to avoid declarin