|
02.17.2010, 01:55 PM
Well, the scripts creates an array of all files in one shot ($dimg = opendir($imgdir);), which is really where I think the delay is happening. The script then loops through this array, and if the current file has an extension that matches one in the $allowed_types array, it adds that file to a final array ($a_img[]).
Running a seperate loop for each type would actually take longer. The only thing I could do differently is save the sorting until the loop is finished.
Thanks for the thoughts though!
|