I did look a this is in the begining, BUT I found it confusing how to
implement a sort.
I looked at a few excamples, but none really made any sence.
Cheers,
Jeremy Coulter
Application Developer
Application Development Centre
Compaq Computer New Zealand Ltd.
Phone: 64 3 371 5724
Fax: 64 3 371 5724
Mobile: 64 0212533214
E-mail: [EMAIL PROTECTED]
Personal Email: [EMAIL PROTECTED]
-----Original Message-----
From: Neven MacEwan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 17, 1999 10:10 AM
To: Multiple recipients of list delphi
Subject: Re: [DUG]: Sorting
Jeremy
Use a TList and implement a sort on it .... see the Sort method of Tlist
Regards
Neven
----- Original Message -----
From: Jeremy Coulter <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Wednesday, 17 November 1999 08:28
Subject: [DUG]: Sorting
> Hi all.
>
> I have been working on a wee logfile analyzer component for myself.
> Basically it loads a CSV file(like one generated bt IIS) into memory and
> then analyzes the entries.
> I.e. in the case of the CSV file from IIS which i am using for developing,
> it calculates how many times an IP adress appears, and calculates how many
> bytes were sent to that IP address, i.e. the result :=
192.168.0.1,20,10000
> (ip address, number of times it appears, how man bytes)
>
> Anyway, one of the things I do is load the file into a TStringList, and
then
> I sort it so i get all the, in this case, IP address grouped togeither,
> which makes it easier to calculate everything, as all the relevient data
is
> all togeiter.
>
> BUT, I have a 7322 line file, and if I sort it, the process of zipping
> through the file takes 22 seconds, remove the sorting, 0.461 seconds !!!!
>
> SO, is there a faster way of sorting ?
> Should I use an inmemory table...and if so, can I sort the fields etc.....
>
> Any suggestions,
>
> Cheers, Jeremy Coulter
>
>
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz