You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Andrew Wilson <aw...@hyperreal.com> on 1996/01/03 20:45:10 UTC

Speeded up mod_dir.c?

>From Chris Hertel:
Forwarded message:
> 
> :       Aiiiiigh! indeed!  Thanks for pointing this out ;)  Please
> : keep in touch with us if you find any other problems.  We'd be
> : interested in sharing your experience of the UnixWare OS.
> 
> Will do!
> 
> BTW, I was poking around in mod_dir.c and noticed that the code does the
> following:
> 
>     1)  Loads all of the directory entries into a linked list.
>     2)  Allocates an array big enough for all of the entries.
>     3)  Copies all of the entries into the array.
>     4)  Qsorts the array to produce a sorted list.
> 
> I have a set of binary tree modules available at
> 
>     http://www.interads.co.uk/~crh/ubiqx/
> 
> It would probably be just as fast if not faster (and more memory-friendly)
> to load the entries into a splay tree.  The code is GNU licensed, so feel
> free to copy & use it.  (I may try to rewrite the module myself, but I
> havn't time just now.)
> 
> Chris Hertel -)-----
> 
> ------
> Christopher R. Hertel -)-----                               crh@ubiqx.mn.org
> Rachel A. Hertel :-)                                        rah@ubiqx.mn.org
>                           St. Paul, Minnesota, USA
>                                 ------------
>