lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Harwood (JIRA)" <>
Subject [jira] Commented: (LUCENE-1720) TimeLimitedIndexReader and associated utility class
Date Tue, 30 Jun 2009 06:52:47 GMT


Mark Harwood commented on LUCENE-1720:

bq. Maybe we can benchmark this approach

The figures were produced by TestTimeLimitedIndexReader that is part of this Jira issue so
you can try benchmarks on your own indexes.

bq.if it slows down queries due to the the Thread.currentThread and hash lookup

This lookup only happens when threads start or stop timed activities and when there is a timed
out state - all other method invocations on TimeLimitedIndexReader eg are
simply testing a volatile boolean which is used to indicate if any timeout has occurred. This
seems to be fast in my benchmarks.

bq. maybe we can .. change the Lucene API such that we pass in an argument to the IndexReader
methods where the timeout may be checked 

The current design uses static methods which remove the need to pass a timeout object as context
everywhere but using this approach comes with the downside that a single client thread is
unable to time >1 activity at once which we thought was a reasonable trade-off. See

> TimeLimitedIndexReader and associated utility class
> ---------------------------------------------------
>                 Key: LUCENE-1720
>                 URL:
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Index
>            Reporter: Mark Harwood
>            Assignee: Mark Harwood
>            Priority: Minor
>         Attachments:,,,
> An alternative to TimeLimitedCollector that has the following advantages:
> 1) Any reader activity can be time-limited rather than just single searches e.g. the
document retrieve phase.
> 2) Times out faster (i.e. runaway queries such as fuzzies detected quickly before last
"collect" stage of query processing)
> Uses new utility timeout class that is independent of IndexReader.
> Initial contribution includes a performance test class but not had time as yet to work
up a formal Junit test.
> TimeLimitedIndexReader is coded as JDK1.5 but can easily be undone.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message