Do you know where your variables are? | |
PerlMonks |
Re: efficient way of searching though large number of text file in a given directoryby pemungkah (Priest) |
on Dec 02, 2010 at 01:02 UTC ( [id://874791]=note: print w/replies, xml ) | Need Help?? |
And adding a combination of caching and Linux::Inotify2 would let you get a nice additional speed gain (plus let you know when to invalidate the cache), assuming repeated searches for the same string are going to be happening. You might even be able to quickly re-prime the cache if the underlying files change infrequently by hanging onto the N most-commonly-repeated searches, redoing these, and then reloading them into the cache in the background.
In Section
Seekers of Perl Wisdom
|
|