Archive: Find Loop


Find Loop
as you can see from my attached script, i'm using this function to search multiple files for specific keywords.

however, it takes quite some time to complete when searching a large amount of files (or for multiple keywords in each file). as none of my searched files is bigger than 10kb, i was surprised about the speed (pentium iv / 1gb ram).

is this in the nature of such a process or is it possible to optimize the function in order to gain a speed-up? any hint would be welcome.


To begin with, end the loop when you find the text you were looking for. From a quick glimpse it doesn't seem you need the number of instances of your query, just weather it was found or not.