Re: Patch: Rasmus statcallpatch with configure option

From: Date: Tue, 14 Sep 2004 18:30:19 +0000
Subject: Re: Patch: Rasmus statcallpatch with configure option
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-12814@lists.php.net to get a copy of this message
On Tue, 14 Sep 2004, Andi Gutmans wrote: > Can you describe the other non-essential syscalls? I want to be sure we > really can't cover those (probably some of them we can't). > As far as the realpath patch goes (which is probably the biggest problem), > I think that if we have the realpath cache in CVS that part of your patch > won't be needed because I think the additional few K of memory wouldn't > make it any noticeably slower even on loaded systems. So let me put some > gas on that patch and that would allow to at least cut down your patch a bit. Well, you can mostly just read the part of the patch that addresses streams.c. I skip the check to see if we are dealing with a pipe in the _php_stream_fopen_from_file() call. This change trickles down and removes a number of small bits that check that is_pipe flag. And I also don't care what position the file pointer is at, so I skip the ftell() just after that which also eliminates a seek in _php_stream_cast(). And in _php_stream_fopen() there is an include/require sanity check fstat() that I also have no use for. It's mostly just looking at the common path and watching the syscalls and getting rid of anything that isn't logically needed to serve up a normal PHP page. I understand that some of these checks are necessary for edge-case things, but when an edge-case check slows down the common case I sacrifize that edge. -Rasmus

« previous php.internals (#12814) next »