Re: [twsocket] IndexOf is slow when there are thousands ofclientsconnected

2010-12-08 Thread Anton S.
One OT question: Would it be faster if we use the cat() method of AnsiString instead of the + operand? It would be faster for you to check it yourself. I have no idea with BCB but on Delphi + operator is counted to be faster than Append(). -- Anton -- To unsubscribe or change your settings for

Re: [twsocket] IndexOf is slow when there are thousands ofclientsconnected

2010-12-07 Thread Arno Garrels
Fastream Technologies wrote: Hello, I have fixed the function as below (providing for the sake of completeness): You are re-inventing the wheel. Simply set property TStringList.Sorted to True and a Add() or AddObject() uses binary search to Insert data at the right index. As I mentioned

Re: [twsocket] IndexOf is slow when there are thousands ofclientsconnected

2010-12-07 Thread Fastream Technologies
Hello Arno, On Tue, Dec 7, 2010 at 7:48 PM, Arno Garrels arno.garr...@gmx.de wrote: Fastream Technologies wrote: Hello, I have fixed the function as below (providing for the sake of completeness): You are re-inventing the wheel. Simply set property TStringList.Sorted to True and a