lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dag Lem <>
Subject Re: [lucy-user] SearchServer / ClusterSearcher - massive performance hit
Date Thu, 25 Oct 2012 18:27:56 GMT
Marvin Humphrey <> writes:

> On Thu, Oct 25, 2012 at 1:35 AM, Dag Lem <> wrote:
> > Even though ClusterSearcher is implemented in Perl, I don't see that
> > the C function top_docs would be calling back into Perl space here,
> > and thus I still don't understand the (big) discrepancy.
> As a matter of fact, we **are** calling back into Perl-space.  :)

I'm sorry, I should have said *SearchServer* (which I did earlier,
some wires must have crossed inside my head) :-/ It's top_docs() in
the *server* that's gobbling up all the cycles, according to
Devel::DProf/dprofpp - just have a look at the profiling info I sent
earlier. The baffling issue is still:

* Lucy::Search::IndexSearcher::top_docs (used by SearchServer) is
  about twice as slow Lucy::Search::Searcher::hits (used by

I still don't understand that one...

I do appreciate your explanation on method dispatching in Lucy, though :)


> I gave it a quick look-see, and your code looks like an accurate port --
> kudos!
> What I was suggesting was something slightly different though:
>      if ($top_docs) {
>          my $top_docs = $searcher->top_docs(query      => $real_query,
>                                             num_wanted => $wanted);
>      }

I see; that would have been better, but since I ran profiling I got a
measure on top_docs() anyway, and it was slightly faster than hits().
So how can top_docs() be twice as *slow* as hits() when top_docs() is
called from SearchServer?

Best regards,

Dag Lem

View raw message