Re: CVS update: php3/functions
| From: | Sascha Schumann | Date: | Mon, 28 Dec 1998 08:26:46 +0000 |
| Subject: | Re: CVS update: php3/functions | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-3091@lists.php.net to get a copy of this message | ||
On Sun, 27 Dec 1998, Rasmus Lerdorf wrote:
> I think making this table persistent would be the key to speeding things
> up. Typically a PHP script will have 2 or 3 different regular expressions
> on a page and that page will be hit many times. Cacheing on a per-request
> basis probably doesn't buy anybody much, and it would in fact slow things
> down because the extra code needed to create the cache without ever
> getting a cache hit would come into play. However, as soon as you cache
> across requests you are going to see performance improvements.
Well, it's not that bad as you make it. Nevertheless, I've implemented the
described way of caching which uses one separate hash table.
This code isn't perfect, at least - if someone uses different regular
expressions all the time, he will suffer from cache misses and from the
resulting slow down. It will also increase the need for memory as the
number of elements isn't limited currently.
Using a local setting could help in this case which could selectively turn
off caching of regular expressions.
Regards,
Sascha Schumann |
Consultant | finger sas@schell.de
| for PGP public key
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net