Re: Streams
- From: "Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 17:16:47 +0200
"Richard" <REMOVE AT-DOTrwskinnerAT@awesomenetDOTnet> wrote in message
news:1125406478_355@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> A little Test Program show below, once it gets over 1000 lines, it
> slows WAY down. String Streams do not seem to be the way to handle
> this, do they? It will process about 1000 strings in 0 seconds, 2000
> strings takes 20 seconds. I have to do 43200 lines.
You're probably being bitten by the stream reallocating the string it
uses for storage every time you append to it. A quick glance at the
code seems to suggest that there's no easy way to prevent that. Every
Write() truncates the contents so you can't pre-allocate the way you
can with TStringList. You'd have to write your own derived class that
doesn't truncate; it should be very little work.
Groetjes,
Maarten Wiltink
.
- Follow-Ups:
- Re: Streams
- From: Rob Kennedy
- Re: Streams
- References:
- Streams
- From: Richard
- Re: Streams
- From: Nicholas Sherlock
- Re: Streams
- From: Richard
- Re: Streams
- From: J French
- Re: Streams
- From: Richard
- Streams
- Prev by Date: Re: Window being cut off (in spite of scaled=false)
- Next by Date: Re: Streams
- Previous by thread: Re: Streams
- Next by thread: Re: Streams
- Index(es):
Relevant Pages
|