RE: [Win32lib] Listview Sorting

new topic     » goto parent     » topic index » view thread      » older message » newer message

> -----Original Message-----
> From: euman at bellsouth.net [mailto:euman at bellsouth.net]

> Im interested in sorting columns in a listview but the routines
> are very slow, has anyone written a faster version?
> 
> 8 columns (len 256 ea.) of data
> 1500+ Items
> 
> PII 233mhz laptop takes 20+ seconds with the current version
> sheesh...

I doubt there's much you could do.  The reason is that windows actually does
the sort.  You just provide the "compare" function, so there's a lot of
'callback' overhead involved, plus whatever you do to compare the items.  I
originally wrote the listview routines in win32lib to manually store the
text for just this reason.  If you let windows do it, then you have to ask
windows for the info each time.

Perhaps if you wrote it in ASM or compiled a dll to do it (and pointed
windows directly at the routine), you could eliminate some of that overhead.
But that's a lot of stuff, sorted or not, to be putting into a listview.
How many times is your current function called, and what exactly are you
using?

Matt Lewis

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu