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

Mark Miller edited comment on LUCENE-1257 at 10/2/09 5:30 PM:
--------------------------------------------------------------

{quote}Actually I patched the Snowball stemmer code to get ridth of the use of 
reflection. So what we use is an altered version of their code. I tried to get 
Dr Porter to commit those changes for years but it's still the same. Based on 
this I think we could just keep going with our own stuff in there as long we 
keep a record of what we have done in case we want to merge with their trunk. 
{quote}

Okay - lets do it then. Testing the English version, its actually almost twice 
as fast with a StringBuilder.

I bet it would be almost twice as fast or better again if we could get rid of 
that nasty reflection ...

*edit*

Wait ... do you mean you got rid of some of the reflection or did we lose your 
changes? I'm seeing some nasty slow reflection in there still ...

*edit*

err... looks like perhaps its only hit once though and then reused.. maybe not 
so nasty. My first time looking at this code, so I'm sure you can clear it up 
...

      was (Author: markrmil...@gmail.com):
    {quote}Actually I patched the Snowball stemmer code to get ridth of the use 
of reflection. So what we use is an altered version of their code. I tried to 
get Dr Porter to commit those changes for years but it's still the same. Based 
on this I think we could just keep going with our own stuff in there as long we 
keep a record of what we have done in case we want to merge with their trunk. 
{quote}

Okay - lets do it then. Testing the English version, its actually almost twice 
as fast with a StringBuilder.

I bet it would be almost twice as fast or better again if we could get rid of 
that nasty reflection ...

*edit*

Wait ... do you mean you got rid of some of the reflection or did we lose your 
changes? I'm seeing some nasty slow reflection in there still ...
  
> Port to Java5
> -------------
>
>                 Key: LUCENE-1257
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1257
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Analysis, Examples, Index, Other, Query/Scoring, 
> QueryParser, Search, Store, Term Vectors
>    Affects Versions: 2.3.1
>            Reporter: Cédric Champeau
>            Assignee: Uwe Schindler
>            Priority: Minor
>             Fix For: 3.0
>
>         Attachments: java5.patch, LUCENE-1257-Document.patch, 
> LUCENE-1257-StringBuffer.patch, LUCENE-1257-StringBuffer.patch, 
> LUCENE-1257-StringBuffer.patch
>
>
> For my needs I've updated Lucene so that it uses Java 5 constructs. I know 
> Java 5 migration had been planned for 2.1 someday in the past, but don't know 
> when it is planned now. This patch against the trunk includes :
> - most obvious generics usage (there are tons of usages of sets, ... Those 
> which are commonly used have been generified)
> - PriorityQueue generification
> - replacement of indexed for loops with for each constructs
> - removal of unnececessary unboxing
> The code is to my opinion much more readable with those features (you 
> actually *know* what is stored in collections reading the code, without the 
> need to lookup for field definitions everytime) and it simplifies many 
> algorithms.
> Note that this patch also includes an interface for the Query class. This has 
> been done for my company's needs for building custom Query classes which add 
> some behaviour to the base Lucene queries. It prevents multiple unnnecessary 
> casts. I know this introduction is not wanted by the team, but it really 
> makes our developments easier to maintain. If you don't want to use this, 
> replace all /Queriable/ calls with standard /Query/.

-- 
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