[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyKDE] slowness of QTableWidget sort ?
From:       "bastian salmela" <basse () kulma ! org>
Date:       2006-08-24 6:28:34
Message-ID: 20060824062834.1725.qmail () nuoli ! com
[Download RAW message or body]

I have rather big list of things (9000 rows, 7 columns) that I read from 
file, and add to QTableWidget, and it seems _very_ slow..
the filling of table takes some (5-10) seconds, and when I click some of the 
headers to sort it, it takes minutes. so obviously that was not usable. 

I decided test the loading and sorting in just python lists and list.sort() 
and guess what, whole process takes 1 or 2 seconds.. 

I understand 9000 rows is a lot, and as this is a toplist, i dont necessary 
need that many, so after inital sort I now add to QTableWidget only 500 
first on the list, which makes the table usable. clicking the headers for 
sorting it according to another column, still takes a bit though, and it got 
me wondering.. 

so why is QTableWidget so slow?
what is so special in the sorting method it uses, and would there be a way 
to speed it up?
sorting 9000 entries in python lists takes less than second, and in 
QTableWidget.. well.. long! 

(my table is not a complicated one, just names and numbers) 

thanks. 

.b 


_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic