Einzelnen Beitrag anzeigen

mjustin

Registriert seit: 14. Apr 2008
3.005 Beiträge
 
Delphi 2009 Professional
 
#22

AW: Optimierung Code / Alternative zu Stringlist? (Delphi 5)

  Alt 17. Mär 2011, 09:55
Tja, leider zu spät - mein Vorschlag wäre gewesen, die TStringlist mit der richtigen Größe zu erstellen, damit das Anlegen neuer Einträge nicht zu viele Speicherallokationen benötigt - also mit Capacity := <gigantische Zahl>

http://docwiki.embarcadero.com/VCL/d...rings.Capacity

http://www.festra.com/wwwboard/messages/13039.html

Zitat:
the trick is in setting the stringlist capacity large enough, so that the program doesn't have to re-adjust the capacity many thousands of times when many items are added
Michael Justin
habarisoft.com
  Mit Zitat antworten Zitat