in reply to File slurping efficiency

I had a similar problem with a smaller number (~7,000) of relatively static small text files, and adopted the strategy of building a flatfile index, then searching the index. Each file had one line in the index. The first token was the filename, followed by a sorted list of unique words (tokens, in this case) in the file. A snap to search, and quite simple to update whenever a file changed or a new file was added.

dws (who misplaced his password)