You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrian Nistor (JIRA)" <ji...@apache.org> on 2013/06/06 20:09:20 UTC

[jira] [Updated] (LUCENE-5044) wasted work in AllGroupHeadsCollectorTest.arrayContains()

     [ https://issues.apache.org/jira/browse/LUCENE-5044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Nistor updated LUCENE-5044:
----------------------------------

    Attachment: patch.diff
    
> wasted work in AllGroupHeadsCollectorTest.arrayContains()
> ---------------------------------------------------------
>
>                 Key: LUCENE-5044
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5044
>             Project: Lucene - Core
>          Issue Type: Bug
>    Affects Versions: 4.3
>         Environment: any
>            Reporter: Adrian Nistor
>            Priority: Minor
>              Labels: patch, performance
>         Attachments: patch.diff
>
>
> The problem appears in version 4.3.0 and in revision 1490286.  I
> attached a one-line patch that fixes it.
> In method "AllGroupHeadsCollectorTest.arrayContains", the loop over
> "actual" should break immediately after "found" is set to "true".  All
> the iterations after "found" is set to "true" do not perform any
> useful work, at best they just set "found" again to "true".
> Method "processWord" in class "CapitalizationFilter" has a similar
> loop (over "prefix"), and this loop breaks immediately after "match"
> is set to "false", just like in the proposed patch.  Other methods
> (e.g., "Step.apply", "JapaneseTokenizer.computePenalty",
> "CompressingStoredFieldsWriter.saveInts", "FieldQuery.checkOverlap")
> also have similar loops with similar breaks, just like in the proposed
> patch.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org