Adding massive amounts of files

Project:phpAlbum.net
Version:0.4.1-beta9
Component:Code
Category:feature
Priority:critical
Assigned:Unassigned
Status:new
Description

I have an FTP folder that already has thousands of pictures (I was planning on dropping in a gallery so that I could browse the pictures instead of one-by-one downloading).
Unfortunately, the script automatically detects newly added pictures and locks up the site as it generates all of the album_files_1###.php and album_comments_1###.php files. This is very bad, as I cannot use the gallery until ALL files have been indexed, and I am given no indication that this is what is going on at all.

I propose that in the event that a new file (files) are detected, a banner would be displayed showing that the databases are being updated, so that at least the user can still use the site, and that only two or three files are generated at a time.