Oh, this is on OSX? I guess realpath() does an open() on every component of a path on OSX? That's nuts!
-Rasmus On Wed, 4 Jun 2003, Jeff Moore wrote: > > On Wednesday, June 4, 2003, at 12:21 PM, Rasmus Lerdorf wrote: > > > Uh, the number of open() calls really shouldn't change. Are you sure > > you > > are comparing the same code? > > Yes. I am sure. > > > And how are you testing? > > I attach fs_usage to the running httpd process and hit the script a > single time. > > http://developer.apple.com/techpubs/macosx/Essentials/Performance/ > PerformanceTools/fs_usage_Fi_alysis_Tool.html > > Here is the full trace for accessing a zero length file called > control.php: > (notice how each directory gets opened three times. in 4.1.2 each > directory gets opened twice.) > > read F=3 B=0x1c5 > stat > /Library/WebServer/Documents/rot/bench/control.php > open [ 2] > /Library/WebServer/Documents/rot/.htaccess > open [ 2] > /Library/WebServer/Documents/rot/bench/.htaccess > stat > stat . > chdir /Library/WebServer/Documents/rot/bench > open F=4 . > chdir /Library/WebServer/Documents/rot/bench > lstat control.php > stat > lstat . > open F=5 .. > fstat F=5 > fstatfs F=5 > fstat F=5 > getdirentries F=5 B=0x68 > lseek F=5 O=0x00000000 > close F=5 > lstat .. > open F=5 ../.. > fstat F=5 > fstatfs F=5 > fstat F=5 > getdirentries F=5 B=0x208 > lseek F=5 O=0x00000000 > close F=5 > lstat ../.. > open F=5 ../../.. > fstat F=5 > fstatfs F=5 > fstat F=5 > getdirentries F=5 B=0x58 > lseek F=5 O=0x00000000 > close F=5 > lstat ../../.. > open F=5 ../../../.. > fstat F=5 > fstatfs F=5 > fstat F=5 > getdirentries F=5 B=0x2ac > lseek F=5 O=0x00000000 > close F=5 > lstat ../../../.. > open F=5 ../../../../.. > fstat F=5 > fstatfs F=5 > fstat F=5 > getdirentries F=5 B=0x218 > lseek F=5 O=0x00000000 > close F=5 > lstat ../../../../.. > fchdir F=4 > close F=4 > stat > stat . > stat > lstat . > open F=4 .. > fstat F=4 > fstatfs F=4 > fstat F=4 > getdirentries F=4 B=0x68 > lseek F=4 O=0x00000000 > close F=4 > lstat .. > open F=4 ../.. > fstat F=4 > fstatfs F=4 > fstat F=4 > getdirentries F=4 B=0x208 > lseek F=4 O=0x00000000 > close F=4 > lstat ../.. > open F=4 ../../.. > fstat F=4 > fstatfs F=4 > fstat F=4 > getdirentries F=4 B=0x58 > lseek F=4 O=0x00000000 > close F=4 > lstat ../../.. > open F=4 ../../../.. > fstat F=4 > fstatfs F=4 > fstat F=4 > getdirentries F=4 B=0x2ac > lseek F=4 O=0x00000000 > close F=4 > lstat ../../../.. > open F=4 ../../../../.. > fstat F=4 > fstatfs F=4 > fstat F=4 > getdirentries F=4 B=0x218 > lseek F=4 O=0x00000000 > close F=4 > lstat ../../../../.. > open F=4 . > chdir /Library/WebServer/Documents/rot/bench > lstat control.php > stat > lstat . > open F=5 .. > fstat F=5 > fstatfs F=5 > fstat F=5 > getdirentries F=5 B=0x68 > lseek F=5 O=0x00000000 > close F=5 > lstat .. > open F=5 ../.. > fstat F=5 > fstatfs F=5 > fstat F=5 > getdirentries F=5 B=0x208 > lseek F=5 O=0x00000000 > close F=5 > lstat ../.. > open F=5 ../../.. > fstat F=5 > fstatfs F=5 > fstat F=5 > getdirentries F=5 B=0x58 > lseek F=5 O=0x00000000 > close F=5 > lstat ../../.. > open F=5 ../../../.. > fstat F=5 > fstatfs F=5 > fstat F=5 > getdirentries F=5 B=0x2ac > lseek F=5 O=0x00000000 > close F=5 > lstat ../../../.. > open F=5 ../../../../.. > fstat F=5 > fstatfs F=5 > fstat F=5 > getdirentries F=5 B=0x218 > lseek F=5 O=0x00000000 > close F=5 > lstat ../../../../.. > fchdir F=4 > close F=4 > open F=4 > /Library/WebServer/Documents/rot/bench/control.php > fstat F=4 > fstat F=4 > lseek F=4 O=0x00000000 > lseek F=4 O=0x00000000 > fstat F=4 > read F=4 B=0x0 > close F=4 > chdir > lstat /usr/share/zoneinfo/GMT > open F=4 /usr/share/zoneinfo/GMT > fstat F=4 > read F=4 B=0x38 > close F=4 > write F=3 B=0xee > lstat private/etc/localtime > open F=4 /usr/share/zoneinfo/America/Detroit > fstat F=4 > read F=4 B=0x32b > close F=4 > write F=17 B=0x9a > read F=3 B=0x0 > close F=3 > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php