Click here to get back home

Apache::AutoIndex - Perl replacment for mod_autoindex

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Apache::AutoIndex - Perl replacment for mod_autoindex Petyr David 04-24-2008
Posted by Petyr David on April 24, 2008, 4:07 pm
Please log in for more thread options
anyone have an experience using this?

The real question:

does using this speed the creation of a directory index in Apache
significantly? We have directories with thousands of small files.

Thanks!

Posted by J. Gleixner on April 24, 2008, 5:15 pm
Please log in for more thread options
Petyr David wrote:
> anyone have an experience using this?
>
> The real question:
>
> does using this speed the creation of a directory index in Apache
> significantly? We have directories with thousands of small files.

It's more likely that it'll be slower because mod_autoindex is
written in C and compiled into the Apache daemon, you're not
going to get much faster than that.

Possibly you could list 500 at a time, or something, which
would be faster, however having thousands of files in a directory
isn't typically a good design.

Posted by Petyr David on April 24, 2008, 8:48 pm
Please log in for more thread options
wrote:
> Petyr David wrote:
> > anyone have an experience using this?
>
> > The real question:
>
> > does using this speed the creation of a =A0directory index =A0in Apache
> > significantly? We have directories with thousands of small files.
>
> It's more likely that it'll be slower because mod_autoindex is
> written in C and compiled into the Apache daemon, you're not
> going to get much faster than that.
>
> Possibly you could list 500 at a time, or something, which
> would be faster, however having thousands of files in a directory
> isn't typically a good design.

agreed, but the nature of the data forces us to store the files in
this fashion so there's some sense of meaningfulness: every file is
named and then has a sequential number appended to it - there 64K
potential numbers. we might have to start something like breaking it
into 1000 files/directory.

either way - thanks for your opinion

Posted by smallpond on April 25, 2008, 10:12 am
Please log in for more thread options
> wrote:
>
> > Petyr David wrote:
> > > anyone have an experience using this?
>
> > > The real question:
>
> > > does using this speed the creation of a directory index in Apache
> > > significantly? We have directories with thousands of small files.
>
> > It's more likely that it'll be slower because mod_autoindex is
> > written in C and compiled into the Apache daemon, you're not
> > going to get much faster than that.
>
> > Possibly you could list 500 at a time, or something, which
> > would be faster, however having thousands of files in a directory
> > isn't typically a good design.
>
> agreed, but the nature of the data forces us to store the files in
> this fashion so there's some sense of meaningfulness: every file is
> named and then has a sequential number appended to it - there 64K
> potential numbers. we might have to start something like breaking it
> into 1000 files/directory.
>
> either way - thanks for your opinion


Why not use a real database instead of making one out of a
filesystem? Directory searches are slow, sequential string
compares. Database lookups use fast hash techniques.

Posted by xhoster on April 25, 2008, 12:10 pm
Please log in for more thread options
> > wrote:
> >
> > > Petyr David wrote:
> > > > anyone have an experience using this?
> >
> > > > The real question:
> >
> > > > does using this speed the creation of a directory index in Apache
> > > > significantly? We have directories with thousands of small files.
> >
> > > It's more likely that it'll be slower because mod_autoindex is
> > > written in C and compiled into the Apache daemon, you're not
> > > going to get much faster than that.
> >
> > > Possibly you could list 500 at a time, or something, which
> > > would be faster, however having thousands of files in a directory
> > > isn't typically a good design.
> >
> > agreed, but the nature of the data forces us to store the files in
> > this fashion so there's some sense of meaningfulness: every file is
> > named and then has a sequential number appended to it - there 64K
> > potential numbers. we might have to start something like breaking it
> > into 1000 files/directory.
> >
> > either way - thanks for your opinion
>
> Why not use a real database instead of making one out of a
> filesystem?

Why not use a file system rather than making one out of a database?
Admitted, appending a sequential number to the file name is rather strange,
but that still doesn't mean that he really wants a database rather than a
file system.

> Directory searches are slow, sequential string
> compares.

Not if you already know the exact name of the file. At least, not on any
reasonable file system. They use trees or hashes or something to find the
file quickly.

> Database lookups use fast hash techniques.

Same as reasonable file systems, given an exact name. Of course, if you
are doing globs, or just extracting all entries, then neither file systems
nor databases will use fast hash techniques.

Xho

--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.

Similar ThreadsPosted
starting apache with mod_perl, error on Apache.pm July 21, 2004, 5:26 pm
Perl And Apache. October 24, 2005, 12:37 am
Perl On Apache August 10, 2007, 2:13 pm
Perl and Apache locking October 14, 2005, 5:16 pm
Apache and Perl in Windows December 23, 2005, 7:29 pm
problem with perl from apache February 2, 2006, 3:57 am
Trouble with Perl on Apache February 6, 2006, 12:04 am
Apache htaccess and perl August 5, 2006, 1:38 pm
Apache Configuration using PERL July 17, 2007, 11:27 am
Apache Configuration with PERL July 18, 2007, 4:24 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap