Re: Performance Consideration of 1 class per file

From: Date: Sat, 24 Apr 2004 16:00:01 +0000
Subject: Re: Performance Consideration of 1 class per file
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-9544@lists.php.net to get a copy of this message
b) let apc_include_file, check if the file has been pre-compiled (based on the a hash lookup of the filenames) , or call the standard zend_compile code.
A nitpick - apc now uses device/inode information and not the file name as hash keys. It's no less or more expensive before, both require an equivalent of realpath() (actually in the apache case the new version is twice as efficient as the old - thanks rasmus).
yeah - you would need to store an additional fullpath=>inode hash. - hence avoiding stat calls on almost all files, (unless they expire..)
I'm undecided on whether or not this one-file-per-class proposal is wise. On one hand, the number of people the 'slowdown' will be tangible to is really pretty small. You need to be doing a significant amount of requests per second to really feel this pain. On the other hand, the mere perception that it's 'slow' or 'inappropriate for large apps' may be something of a death knell in and of itself.
Which is really why the RFC needs to be backed up by a good indepth discussion of the performance issues and possible solutions (which you and Rasmas do wonderfull job of :) Regards Alan
George
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

« previous php.internals (#9544) next »