[wxPython-users] wxGrid performance
Robin Dunn
robin at alldunn.com
Mon Oct 1 12:59:10 PDT 2007
Jeff Peery wrote:
> Hello, I'm using a wxgrid in my application and it seems to get very
> slow in I have more than 1000 cells. most of the problems occurs when I
> set the background color of cells, using SetCellBackgroundColor(). If I
> don't set the background color the grid performs much quicker (I can
> scoll through the spreadsheet without have to wait for it to refresh).
> Is there a better way to set the background color so it won't cause the
> grid to be so slow?
>
> Also to set the cell data I iterate through all the data points and use
> SetCellValue() to set the cell data. I also use SetRowLabelValue() to
> set the row label. For datasets that are large (in the thousands) this
> is too slow to redraw. Is there a quicker way to draw the spreadsheet?
> Thanks.
Use a table and provide the cell data and attributes from it
"on-demand". Take a look at the "HUGE table" sample in the demo. It
has 100 million cells, uses background colors, and is very fast.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list