[ 
http://issues.apache.org/jira/browse/LUCENENET-8?page=comments#action_12444126 
] 
            
T.H. commented on LUCENENET-8:
------------------------------

This seems directly related to LUCENENET-11, since the patch that is in that 
issue appears to fix this as well.

I was wondering if anyone has done much testing on the change that Fabio 
recommeded or on the patch in LUCENENET-11 or has otherwise reviewed either of 
these? We are doing some load testing on our application right now, and we are 
at time seeing up to 1000 .NET exceptions being thrown PER SECOND by the 
Lucene.NET DLL because of these "thrown on purpose" exceptions. (We are testing 
under a pretty large load and are doing multiple searches per user.)

Anyway, I was just wondering if anyone has put these changes into production, 
or if some of the more knowledgable members of the project have any serious 
concerns about implementing these changes?

While I understand the need to try to keep the code base close to the Java 
version, it seems like this is a situation where the exceptions may be 
necessary in Java, but are completely unnecessary and otherwise harmful to the 
.NET version.

Any comments would be greatly appreciated!

And thanks to everyone for their great work on Lucene.NET!

> Throwing an exception as a result of a normal situation is extremely bad in 
> .net
> --------------------------------------------------------------------------------
>
>                 Key: LUCENENET-8
>                 URL: http://issues.apache.org/jira/browse/LUCENENET-8
>             Project: Lucene.Net
>          Issue Type: Task
>         Environment: Windows XP, Visual Studio 2003
>            Reporter: Jo Inge Arnes
>         Assigned To: George Aroush
>         Attachments: test.patch
>
>
> At the end of the FastCharStream.Refill() method, it says:
> int charsRead = input.Read(buffer, newPosition, buffer.Length - newPosition);
> if (charsRead <= 0)
>    throw new System.IO.IOException("read past eof");
> else
>    bufferLength += charsRead;
> When I run Lucene in the debugger, this causes an exception to be thrown all 
> the time.
> To me it looks like it is thrown as a result of a normal situation, not 
> because of some critical error.
> Is this correct?
> If this is the case, then the code is horrible. Throwing an exception in .NET 
> is extremely slow, and should never be thrown as a result of a normal 
> situation. I repeat: "extremely slow"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to