delphi stringlist capacity

Posted by Johan p14205 on March 22, 2007

In a Delphi application for full text indexing, I use stringlist objects, doing a lot of adding and modifying items. Because the operations take a lot of time (ten thousands of items), I'm trying to optimize the code, but I don't know where the bottleneck is: in the calculations or in adding the stringlist items. Somewhere I read that it is faster if you set the capacity of the stringlist before adding items. Is this really effective?

Thanks for helpng me out!
Johan

Related articles

       

Follow Ups