By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,721 Members | 1,217 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,721 IT Pros & Developers. It's quick & easy.

Number of Files in PHP Library

P: n/a
Hi,

PHP allows the "library" which can contain an arbitrary number of include
files.

Can I put all the include files right in this directory, or should I create
subdirectories?

My question comes about because I understand that *nix systems begin to run
into performance difficulties at around 200 files in a directory (linear
search times for a directory).

Has anyone had experience with a large number of include files in a single
directory? How many? Did it seem to affect performance?

Thanks, Dave Ashley.

Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In article <lm*******************@fe41.usenetserver.com>,
"David T. Ashley" <da*****@cequentgroup.com> wrote:
Hi,

PHP allows the "library" which can contain an arbitrary number of include
files.

Can I put all the include files right in this directory, or should I create
subdirectories?

My question comes about because I understand that *nix systems begin to run
into performance difficulties at around 200 files in a directory (linear
search times for a directory).

Has anyone had experience with a large number of include files in a single
directory? How many? Did it seem to affect performance?

Thanks, Dave Ashley.


200 is way to small. More like in the thousands, at least on Solaris.
YMMV depending on the Unix variant. Besides, when you use readdir(),
you're scanning the directory linearly anyway, one line at a time.

--
DeeDee, don't press that button! DeeDee! NO! Dee...

Jul 17 '05 #2

P: n/a
David T. Ashley <da*****@cequentgroup.com> wrote:
My question comes about because I understand that *nix systems begin to run
into performance difficulties at around 200 files in a directory (linear
search times for a directory).


This statement is both false as correct. There are *nix filesystems
which do re linear, there are also fs which use btrees: O(log n)
worstcase. So what system are you php running on?

--

Daniel Tryba

Jul 17 '05 #3

P: n/a
> This statement is both false as correct. There are *nix filesystems
which do re linear, there are also fs which use btrees: O(log n)
worstcase. So what system are you php running on?


Linux 7.3, ext3.

Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.