I have a set of results from an SQL query (actually, it goes from
nothing to 24000 cells --- 24 columns and 1000 lines --- due to a
LIMIT on the SQL query) and it takes 'a lot' of time to populate
it. Is there anything I can do to improve this besides making small
chunks to populate the table?
I've already read the demo examples, but they don't deal with the data
before putting data there and all sizes are fixed when mine are
variable.
I have a set of results from an SQL query (actually, it goes from
nothing to 24000 cells --- 24 columns and 1000 lines --- due to a
LIMIT on the SQL query) and it takes 'a lot' of time to populate
it. Is there anything I can do to improve this besides making small
chunks to populate the table?
I've already read the demo examples, but they don't deal with the data
before putting data there and all sizes are fixed when mine are
variable.
Create a subclass of wxPyGridTableBase and use it for holding your data. Then the grid will ask it only for the data that it needs to display at the moment and you don't have to fully populate the grid before using it. See the demo for examples and also http://wiki.wxpython.org/index.cgi/wxGrid_20Manual
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!