Performance tuning #2
| From: | Peter Illes | Date: | Sun, 30 Dec 2001 13:52:46 +0000 |
| Subject: | Performance tuning #2 | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-11214@lists.php.net to get a copy of this message | ||
Hi,
This is the second post of this problem since I did not get any answer for
the first. Please, could someone out there help? Thanks in advance...
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