View previous topic :: View next topic |
Author |
Message |
jrdeahl -
Joined: 27 Dec 2006 Posts: 50
|
Posted: Fri May 23, 2008 11:22 am Post subject: Looking for a fast directory listing |
|
|
Using x2 on a p4 machine.
Need a faster directory listing over the default. The default takes 75 seconds to list 3,790 files.
Last year I heard rumors abyss was going to speed it up because apache is a lot faster (5 seconds). Any more on this?
Need something to speed it up!
John
Last edited by jrdeahl on Thu May 29, 2008 10:32 pm; edited 3 times in total |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue May 27, 2008 3:29 pm Post subject: Re: Looking for a fast directory listing |
|
|
jrdeahl,
Writing your own PHP (or any language) directory listing script will certainly be faster. The default directory listing of Abyss Web Server uses the SSI engine (which is not fast) and sends data in small chunks. This will be fixed in 2.6. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
jrdeahl -
Joined: 27 Dec 2006 Posts: 50
|
Posted: Thu May 29, 2008 10:30 pm Post subject: |
|
|
After looking and testing several php scripts I think I have found the fastest one.
This script displays what ever you want for a picture, some text and then the files. Displaying almost 4,000 files is done by starting right away displaying to the screen and then completeing in about 20 seconds.
Alter to your desire. Does not show file sizes, etc.
/********************************************************************
* function that reads directory content and
* returns the result as links to every file in the directory
*
* toss it into any directory and get a list of links to every file
*
* This program is free software licensed under the
* GNU General Public License (GPL).
*
*********************************************************************/
function directory($result) {
$handle=opendir(".");
while ($file = readdir($handle)) {
if ($file == "." || $file == "..") { } else { print "<a href=$file>$file</a><br>"; }
}
closedir($handle);
return $result;
}
?>
<img src="http://www.yourwebsite.com/image.jpg"
<p>
<p>
<b>Complete directory list MAY TAKE AWHILE TO DISPLAY.</b>
<p>
<b>Use your browser Find/Search feature to search.</b>
<p>
<b>Right click mouse on file to save to your computer.</b>
<p>
<?
echo directory($result);
?> |
|
Back to top |
|
 |
|