Paul Ishenin wrote:
Andrew Haines wrote:
I did a small test loading a text file with 50,000+ lines with my custom
model and the GtkTreeView retrieved the value of each item in the list
on startup. I assume it's to calculate the size for the scrollbar since
the height of the listitems is not fixed but can vary per row in the
GtkTreeView.
Would this help virtual treeview in any way?
For virtual listview it is not needed to store any items anywhere - we
only need to tell to treeview that we have 50,000+ items and return
correct listitem when it is requested by index. Yes, it would help to
store less data.
At the moment data is stored:
- our own structure which we want to represent in the listview
- gtk list model items - we are storing there 50,000+ items * 3
(checkbox, glyph, index) = 50,000+ * 9+ bytes = 450,000++ bytes
If we can remove gtk list then we of course save some memory.
If we use our own gtkmodel, then it should be possible to use the data
in the TListview, without storing itself
Reminds me that I still need to create out own "image" which can be
dramw from an imagelist, so you don't need 50000+ instances of the same
image data.
Marc
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus