lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Haws (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENENET-541) Performance issue with IOException in FastCharStream.
Date Sat, 31 May 2014 18:50:01 GMT

    [ https://issues.apache.org/jira/browse/LUCENENET-541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14014743#comment-14014743
] 

Christopher Haws commented on LUCENENET-541:
--------------------------------------------

Hello Prescott,

Sure thing, let me explain the changes I made. I modified the FastCharStream.Refill method
to return a bool instead of a void. The bool value will be true if the end of the stream has
not been reached and false if it has been reached. I then went to the few places where Refill
is called and modified the syntax to handle a true or false value. For example, in the ReadChar()
method, if the Refill method has reached the end of of the stream (and thus returned a value
of false), then the ReadChar() will return a Char.MinValue character (char '0' represents
NULL). Then in all the places where ReadChar is used, I took out the IOException try/cache
clauses and replaced them with if clauses checking for the Char.MinValue character instead
of waiting for an exception.

Thanks!

Chris

> Performance issue with IOException in FastCharStream.
> -----------------------------------------------------
>
>                 Key: LUCENENET-541
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-541
>             Project: Lucene.Net
>          Issue Type: Improvement
>          Components: Lucene.Net Core
>    Affects Versions: Lucene.Net 3.0.3, Lucene.Net 3.6, Lucene.Net 4.0
>            Reporter: Christopher Haws
>            Priority: Minor
>              Labels: performance
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> The Refill() method of the FastCharStream class contains logic based on an IOException
being thrown. This logic degrades the performance of every query by about 10x from my testing.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message