Why is chdir() so slow?

Why is chdir() so slow?

am 05.11.2009 02:31:04 von Raymond Irving

--0-1029184982-1257384664=:44673
Content-Type: text/plain; charset=us-ascii

Hello,

I've been doing some test with getcwd() and chdir() and it has turned out that calling getcwd() is much faster than chdir()

Any ideas why this is so? Is it the OS?

Tested on Windows XP
--0-1029184982-1257384664=:44673--

Re: Why is chdir() so slow?

am 05.11.2009 03:08:36 von Jonathan Tapicer

You know that getcwd and chdir do different things, right? Why are you
comparing them?

Jonathan

On Wed, Nov 4, 2009 at 10:31 PM, Raymond Irving wrote:
> Hello,
>
> I've been doing some test with getcwd() and chdir() and it has =A0turned =
out that calling getcwd() is much faster than chdir()
>
> Any ideas why this is so? Is it the OS?
>
> Tested on Windows XP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Why is chdir() so slow?

am 05.11.2009 04:58:05 von Raymond Irving

--0-1133901151-1257393485=:91095
Content-Type: text/plain; charset=us-ascii

Hi,

Yes, I know they do different things but I'm wondering if chdir makes a call to the OS or does it writes the value to a CWD variable inside the PHP engine?





________________________________
From: Jonathan Tapicer
To: Raymond Irving
Cc: PHP-General List
Sent: Wed, November 4, 2009 9:08:36 PM
Subject: Re: [PHP] Why is chdir() so slow?

You know that getcwd and chdir do different things, right? Why are you
comparing them?

Jonathan

On Wed, Nov 4, 2009 at 10:31 PM, Raymond Irving wrote:
> Hello,
>
> I've been doing some test with getcwd() and chdir() and it has turned out that calling getcwd() is much faster than chdir()
>
> Any ideas why this is so? Is it the OS?
>
> Tested on Windows XP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--0-1133901151-1257393485=:91095--