[Lazarus] In search of a component for holding a table of strings

Werner Pamler werner.pamler at freenet.de
Tue Jan 10 12:10:31 CET 2017


>> Mind you that when you do not know the dimensions of the table AND you
>> have to increase ColCount several times whilst filling the table, then
>> I suspect things will slow down significantly, because each increase
>> of ColCount requires RowCount times a SetLength on each row (which
>> means re-allocating the entire row).
> Ah - that's the explanation: you did your test with a predimensioned 
> table? Mine started with an empty table, and with every new cell the 
> tree sorts the new cell to the correct location and rebalances itself. 
> It would be interesting to compare with your table in the same way.

If the author if the AVLTree is reading this: Is there a way to add a 
group of nodes to the tree which are already ordered such that they will 
be adjacent? The normal "Add" method assumes that the node can be 
anywhere, and the tree has to find the correct location for the new 
node. I guess that such a "batch mode" could speed up loading the AVLTree.


More information about the Lazarus mailing list