Re: Benchmarking 4.3.2 vs 4.1.2
| From: | Andi Gutmans | Date: | Wed, 11 Jun 2003 04:16:31 +0000 |
| Subject: | Re: Benchmarking 4.3.2 vs 4.1.2 | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-2279@lists.php.net to get a copy of this message | ||
At 06:55 PM 6/10/2003 -0700, Rasmus Lerdorf wrote:
On Tue, 10 Jun 2003, Ilia A. wrote: As far as realpath() goes beyond the _once() directives and php installations where safe_mode or open_basedir are enabled it is not really needed. To handle safe_mode/open_basedir is fairly easy and mostly involves passing TSRMLS_CC to virtual_file_ex() and then putting realpath related code inside if (PG(safe_mode) || PG(open_basedir)) {. I already have a patch for this. I wonder if instead of comming up with an alternative way, which is likely to involve stat() or lstat(). We could add a flag that would allow us to identify *_once requests and make realpath conditional on that. The main issue here is that we do an implicit require_once on the main script now. If you remove the realpath() on that main script load, then a subsequent include_once on the same file through the actual path, or a different symlinked path will not be caught. Personally I think this is way too much of an edge case to warrant the horribly expensive realpath() call on every single request and I am perfectly fine simply telling people not to do that. We lived with this situation for a long time and it was only recently someone "fixed" this.Personally I think the way to fix this is to have a realpath cache and not to break functionality. This could be implemented relatively easily and would give you the speed you want without breaking anything. Andi