Re: [Lxr-dev] Solution for "Don't require glimpse for file search"
Brought to you by:
ajlittoz
From: Shree K. <sh...@pr...> - 2002-02-25 13:05:46
|
Hi Malcolm, > I see that's what your new patch does - it seems good to me. > Unfortunately I've suffered a major computer failure, so I'm unable to > commit patches at the moment. I hope to get things back together > sometime this weekend and then be able to get your patch in. I have already encountered a major problem with the patch I sent. The problem is due to the query to get all files of a particular release: $self->{all_files_select} = $self->{dbh}->prepare ("select distinct f.filename ". "from symbols s, indexes i, files f, releases r ". "where s.symid = i.symid and i.fileid = f.fileid ". "and r.release = ?"); I had actually tested the patch for a small repository - it's with a big repository that the problem creeps in. In a big repository, it's very costly to do the join due to the huge number of entries in the "indexes" table! - and MySql makes my computer crawl [Win2k almost hangs with mysql taking 99% of CPU time]... The query has to be changed to : $self->{all_files_select} = $self->{dbh}->prepare ("select distinct f.filename ". "from files f, releases r ". "where f.fileid=r.fileid and r.release = ?"); With this change filesearch works properly - but there is one problem : If a file is not identified as belonging to a "language", it is not added to the filename list. Refer processfile() in Tagger.pm. The solution is to move the "return unless $lang;" line to come after the line "$index->release($fileid,$release)" in processfile() - Shree Kumar |