This patch is a proposed solution to the "Don't require glimpse for file search" feature request.
Here's a brief description of the patch :
The patches are against the LXR-0.9.1 release.
The attached .tgz file has two files -
"find.patch" is a patch for the "find" script and
"mysql_find.patch" is a patch for lib/LXR/Index/MySQL.pm
The patch provided is for the MySQL backend. [It should be easy enough to do the same with
postgres]
The "find" script calls the "getmatchingfiles" method which returns the list of all files belonging to
a
particular tag and matching the regular expression entered by the user.
The "getmatchingfiles" method executes a query to get all filenames with the specified tag. As
each filename is fetched, it is matched with the regexp and rejected if it doesn't match. The list of
matching files, along with the count is returned.
As Malcolm has pointed out [in the developer mailing list], source trees of large projects can have
thousands of files and the memory usage [while the query executes] can become quite high. I
haven't measured the memory impact. One possible way to solve this would be by using a cursor.
When applying the patch, 2 hunks might get rejected. These are the lines with the "CVSID" stuff -
you can safely ignore these.
Patches for file search without using glimpse