Re: GTKClist Sorting

From: Date: Tue, 21 Mar 2006 21:40:53 +0000
Subject: Re: GTKClist Sorting
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-6806@lists.php.net to get a copy of this message
Neil - You can use your DB sorting of course to load the records initially, but that gets tossed out when you use the column sort, which is what I assume you're referring to... Besides, based on our own development, I would say you're going to get into trouble trying to load too many records into the CList at once. Some time ago, after complaints with the CList loading, we decided to limit the retrievals to the hundreds, and use previous/next buttons to allow the user to control the remaining entries. So far, everybody's been able to live with that, but it doesn't work, of course, if you want to use the column sort over the whole pass. On the other hand, that kind of sort could grind a PC to a serious halt - depending on the hardware and the volume. As to re-doing the existing sort variables via libraries, I'm out of my league there. Maybe consider posting to the devel list for an answer on that one. HTH, Madeleine D. Neil Eisgruber wrote:
Hello, I am currently writing a gtk program that has a GtkCList. This list contains Dates and numbers so the built in sorting was not working correctly. I found the bubblesort algorithm on the help pages, but that turned out to be really slow (as expected). After that I wrote a quicksort algorithm which allowed me to sort a bit quicker then the bubble sort. The problem is that I am trying to sort thousands, or maybe even a million records. Has anyone found a way to do this more quickly? Is there any way that I could compile a library to do that? If so are there any tutorials or anything that could help me? On a side note, when I sort the records using the built in functionallity (non natural sorting) it works quickly... Thanks for any help! Neil


« previous php.gtk.general (#6806) next »