Seth Grover wrote:
However, for the purposes of testing, I then increased the count to
1000000, since a major purpose of a virtual list view is so you don't
have to eat up all your memory storing the items.

To my dismay, when I ran the program, it ran correctly, but the memory
usage of my program was huge compared to when I only had 10 items.

I put some writeln's in the OnData method and also discovered that
that the OnData routine was called, on startup of my program, for each
of my million items.

Am I doing something wrong? Is there some other way I'm supposed to
set the number of items for my list rather than setting Items.Count? I
tried looking at the revision changes
(http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&root=lazarus&revision=22789)
and didn't see any other way.
ListViews on gtk can't be absolutely virtual - they need to have all the items. But captions, checks, etc are not stored in it (in the case of virtual) - they are requested before the drawing. So you should have some memory reduction in comparition with the real listview.

Only windows has real virtual listview. Other widgetsets have only compatible interface (your first test), not the implementation (storage organisation - your second test).

Best regards,
Paul Ishenin.

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to