Menu

#24 Regexp search for identifiers

Experimental
open
Browsing (12)
6
2013-01-02
2002-06-26
Malcolm Box
No

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

Discussion

  • Shree

    Shree - 2002-06-27

    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...

     
  • Malcolm Box

    Malcolm Box - 2002-06-27

    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.

     
  • Heikki Toivonen

    Heikki Toivonen - 2004-03-12

    Logged In: YES
    user_id=972898

    The URL is no longer valid, could someone please attach a
    patch here?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.