Regexp search for identifiers
Brought to you by:
ajlittoz
Shree has provided a patch on the lxr-developer list to
implement regexp searchs for identifiers. This is a
good thing :-)
See
http://sourceforge.net/mailarchive/forum.php?thread_id=484514&forum_id=1790
for more details
Logged In: YES
user_id=142912
With the changes that I have given, if you try identifier search
on large source trees then I observe that my system slows
down and mysql takes 100% cpu time! [this was also
reported by one more person - I forgot who]
The fix for this is to change the query
$self->{all_ident_select} = $self->{dbh}->prepare
("select distinct s.symname ".
"from symbols s, indexes i, files f, releases r ".
"where s.symid = i.symid and i.fileid = f.fileid ".
"and f.fileid = r.fileid ".
"and r.release = ?");
to
$self->{all_ident_select} = $self->{dbh}->prepare
("select distinct s.symname ".
"from symbols s, indexes i, releases r ".
"where s.symid = i.symid and i.fileid = r.fileid ".
"and r.release = ?");
Now things should work fine...
Logged In: YES
user_id=215386
Unfortunately it's still unusably slow even with that
optimisation, at least for my installation which has a very
large number of identifiers.
I'm working on working out how to make this run at
acceptable speed with MySQL. It would be great if someone
could benchmark it with Postgres - my feeling is that this
query shouldn't be taking as long as it is. So far the best
I've come up with is to create a temporary table with all
the identifiers for a release, and then to use that to find
the symbols.
Logged In: YES
user_id=972898
The URL is no longer valid, could someone please attach a
patch here?