String performance tuning?

From: Date: Thu, 27 Dec 2001 10:42:01 +0000
Subject: String performance tuning?
Groups: php.windows 
Request: Send a blank email to php-windows+get-11146@lists.php.net to get a copy of this message
Hi, I wonder if there is any performance tuning newsgroup/faq/whatever related to PHP. I searchead to no avail... Anyway, my current mind boggler is: we are accumulating a large (~400k) XML response in a string before sending it out by adding little pieces a time (like 10-20 chars). Now this results in very bad performance -- most probably due to the fact that the string is enlarged/re-allocated thousands of times. I would love to pre-allocate a big buffer for the string so that performance gets better (something like SetLength() in Delphi). How can I do this? Xuse me if the answer is much too trivial, I'm a newbie in PHPland :-) Thanks for any suggestion, Peter

« previous php.windows (#11146) next »