[ 
https://issues.apache.org/jira/browse/LUCENE-1911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12756188#action_12756188
 ] 

Mark Miller commented on LUCENE-1911:
-------------------------------------

I guess I would lean toward isCacheable myself. Its much cleaner than trying to 
juggle a list and overrides. 

I guess the downside is that someone could be using a custom one that was 
cacheable, and so it would be copied. But they can
update to the new API as a workaround.
And you get that with the other solution in certain cases too (unless the user 
updates to use the new API and does the override).
That also requires tracking which CachingWrapperFilters get passed what Filters 
and its just much uglier right?

+1 on isCacheable.

You could argue to keep the override too - if someone was using a jar that says 
its not cachaeable, but it is, and can't change the source. A
Likely scenario I'm sure ;) But worth the method it would seem. It still 
becomes much less necessary though.

> When using QueryWrapperFilter with CachingWrapperFilter, QueryWrapperFilter 
> returns a DocIdSet that creates a Scorer, which gets cached rather than a bit 
> set
> -------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-1911
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1911
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Mark Miller
>            Assignee: Uwe Schindler
>             Fix For: 2.9
>
>         Attachments: LUCENE-1911.patch
>
>
> there is a large performance cost to this.
> The old impl for this type of thing, QueryFilter, recommends :
> @deprecated use a CachingWrapperFilter with QueryWrapperFilter
> The deprecated QueryFilter itself also suffers from the problem because its 
> now implemented using a CachingWrapperFilter and QueryWrapperFilter.
> see 
> http://search.lucidimagination.com/search/document/7f54715f14b8b7a/lucene_2_9_0rc4_slower_than_2_4_1

-- 
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: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to