lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (LUCENE-1796) Speed up repeated TokenStream init
Date Mon, 10 Aug 2009 18:05:14 GMT

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

Uwe Schindler edited comment on LUCENE-1796 at 8/10/09 11:04 AM:
-----------------------------------------------------------------

I have another idea:
Why not make the AttributeImpls itsself a linked list. So each AttributeImpl gets a member
called "nextAttributeImpl" for the linked list. Whenever an AttributeImpl is added to an AttributeSource,
the last added AttributeImpl's next is set to the added one. By this iterating over AttributeImpls
is just a simple for-loop from the first attribute. The AttributeSource must hold a reference
to the first and last Attribute, but only one-direction linkage from first to last.

As Attributes can only added to one AttributeSource and not to multiple ones, I see no problem
with it. And AttributeImpls can also not removed, so no problem at all.

      was (Author: thetaphi):
    I have another idea:
Why not make the AttributeImpls itsself a linked list. So each AttributeImpl gets a member
called "prevAttributeImpl" that is the staring point. Whenever an AttributeImpl is added to
an AttributeSource, the prevAttributeImpl is set to the previously added one. By this iterating
over AttributeImpls is just a simple for-loop from the first attribute.

As Attributes can only added to one AttributeSource and not to multiple ones, I see no problem
with it. And AttributeImpls can also not removed, so no problem at all.
  
> Speed up repeated TokenStream init
> ----------------------------------
>
>                 Key: LUCENE-1796
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1796
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Mark Miller
>            Assignee: Uwe Schindler
>             Fix For: 2.9
>
>         Attachments: LUCENE-1796.patch, LUCENE-1796.patch, LUCENE-1796.patch
>
>
>  by caching isMethodOverridden results

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


Mime
View raw message