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:[email protected]> ' <http://www.georgeanelson.com/> _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
