in reply to Is there a way to set max results on File::Find::Rule?
A user interface to File::Find::Anything and a million files to search sounds like a bad combination. Have you considered the efficiency of only running File::Find periodically, dumping the results into a database of some description, and then running the search on that DB rather than on the filesystem directly. Even a flat file database would be vastly quicker than recursing the directory tree on a regular basis.
Not suprisingly this is not a unique problem. In *nix land there is a program called (s)locate(1) which does exactly this task (recurse the tree, dump to DB, search the DB). File::Locate is a perl interface to it.
Cheers
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
File::Locate and File::Locate::Harder (was Re^2: Is there a way to set max results on File::Find::Rule?)
by doom (Deacon) on Dec 21, 2007 at 04:54 UTC | |
|
Re^2: Is there a way to set max results on File::Find::Rule?
by leocharre (Priest) on Jan 02, 2008 at 14:36 UTC |