Number of Files in PHP Library

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David T. Ashley

    Number of Files in PHP Library

    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.



  • Michael Vilain

    #2
    Re: Number of Files in PHP Library

    In article <lmTdd.55232$em 3.35361@fe41.us enetserver.com> ,
    "David T. Ashley" <dashley@cequen tgroup.com> wrote:
    [color=blue]
    > 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.[/color]

    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...



    Comment

    • Daniel Tryba

      #3
      Re: Number of Files in PHP Library

      David T. Ashley <dashley@cequen tgroup.com> wrote:[color=blue]
      > 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).[/color]

      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

      Comment

      • David T. Ashley

        #4
        Re: Number of Files in PHP Library

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

        Linux 7.3, ext3.



        Comment

        Working...