Re: Weird slowdown using complex functions in a loop
| From: | pgcd | Date: | Wed, 12 Mar 2003 15:27:42 +0000 |
| Subject: | Re: Weird slowdown using complex functions in a loop | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-139319@lists.php.net to get a copy of this message | ||
Actually, the concept is the following:
- split the text into a number of elements (tags and text between tags) and
put them into an array
- fix each element (text and tags) to prevent attributes and entities from
breaking the parser
- check all the elements to make sure that they are either self-closing
(text or empty tags) or matched by a closing tag somewhere
- append sequentially the text from all the elements to $result
- empty the elements array
- return $result
I honestly don't see how this can lead to a slowdown...
----- Original Message -----
From: "Jimmy Brake" <jimmy@isurge.com>
To: "pgcd" <pgcd@asphalto.org>
Cc: <php-general@lists.php.net>
Sent: Wednesday, March 12, 2003 2:16 PM
Subject: Re: [PHP] Weird slowdown using complex functions in a loop
> where are you storing the information that you are cleaning once it is
> cleaned?
>
> are you appending it to a variable in the script?
>