Skip to main content.
home | support | download

Back to List Archive

Re: optimization for PhraseHighlight.pm

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Wed Jul 07 2004 - 20:12:06 GMT
Thanks, any optimizations would be wonderful.  That's a module that's
based on a brut-force approach and very slow.  Any time I see nested
loops like in that module red flags go up.  I think the best method to
speed up that module is to use one that doesn't try to be so accurate.
Simple regex matches are way faster.

Anyway...

On Wed, Jul 07, 2004 at 12:00:46PM -0700, Bill Schell wrote:
> Looked like a prime optimization candidate.   The intention of the
> $flags array is to flag words in the document that will later be
> output.  I have added a check before the $flag setting code code  to
> determine if all the words in the document are involved. 

What do you mean by "involved".  In what cases will this happen?
Looks like only when a phrase matches all words in a document.  Is
that right?  Or am I confused by my own code? ;)

-- 
Bill Moseley
moseley@hank.org

Unsubscribe from or help with the swish-e list: 
   http://swish-e.org/Discussion/

Help with Swish-e:
   http://swish-e.org/current/docs
   swish-e@sunsite.berkeley.edu
Received on Wed Jul 7 13:12:20 2004