[PyKDE] Huge amount of time

Greg Fortune lists at gregfortune.com
Wed Aug 20 22:18:01 BST 2003


And always more memory efficient except for very small sequences.  The thing 
that's killing him for memory is the creation of 65000*numCols number of 
table cell editors.  Like I posted earlier, the inner loop is not the largest 
problem and switching from range to xrange is going to make no difference.  
My machine with dual MP 2400's and 1GB of DDR gets destroyed when doing

tbl.setNumCols(10000)
tbl.setNumRows(10000)

It consumed all my memory and started thrashing in swap before I killed it.  
That's before it even *gets* to the loop setting the headers.  Table cell 
editors consume lots of memory, but the Qt docs address the problem and show 
you how to create sparse tables that can be very large.

Greg Fortune
Fortune Solutions

On Wednesday 20 August 2003 12:56 pm, Frederick Polgardy Jr wrote:
> Faster to create, that is.  They may be a tiny hair slower to use,
> because xrange computes each index when you ask for it.
>
> On Wednesday 20 August 2003 02:52 pm, Frederick Polgardy Jr wrote:
> > Xrange provides iterator semantics without actually creating a
> > sequence, so it will always be faster, but the speed isn't noticeable
> > to a human in this case.
>
> _______________________________________________
> PyKDE mailing list    PyKDE at mats.imk.fraunhofer.de
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde




More information about the PyQt mailing list