[pygtk] treeview(list) model for large data sets
Tony Nelson
tonynelson at georgeanelson.com
Sun Mar 15 15:55:27 WST 2009
At 16:21 -0700 09/03/14, Chris Camacho wrote:
>As I understand it when a generic table model instances, it iterates
>through all the items it can in order to make its own internal
>representation.
>
>However if I have a data set of 1,000's or possibly 1,000,000's is there
>any way to get the data model to only iterate the items it need for the
>current window of view
>
>Ideally I'd like to cache rows in a kind of first in last out buffer, the
>oldest rows being released in favour of the new rows as the view scrolls.
>
>Any ideas?
Well, I did that in C++ on MacOS about 10 years ago, in my own widget class
library. Let me know if you want the code for reference for writing your
own Python GTK version. I only cached (up to) one row, so that a row
scrolled off could be re-used for a row scrolled on (iteratively when
scrolling by several rows). My demo program could scroll 4 billion rows on
a small computer, or a hundred million or so selectable rows, or rather
fewer if there was any actual data in the rows.
--
____________________________________________________________________
TonyN.:' <mailto:tonynelson at georgeanelson.com>
' <http://www.georgeanelson.com/>
More information about the pygtk
mailing list