Re: Performance degradation part 2 the module version
| From: | Rasmus Lerdorf | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: Performance degradation part 2 the module version | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-94504@lists.php.net to get a copy of this message | ||
On Sun, 23 Feb 2003, Jim Jagielski wrote:
> Rasmus Lerdorf wrote:
> >
> > Even in 4.2, I think we can optimize it. Assuming chdir() doesn't return
> > an error, we shouldn't need that second getpwd() call since we just did
> > the chdir() and we should know where we are.
> >
>
> Not necessarily... In a threaded environment, if threadA does
> chdir(/tmp) and then threadB does chdir(/var), then the actual
> process is in /var for the remainder of threadA (IIRC).
> chdir() is process scoped.
That's true, but in threaded mode we don't do the chdir() at all. This is
specifically for non-threaded.
-Rasmus