lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [lucenenet] NightOwl888 opened a new issue #353: Refactor IndexSearcher
Date Wed, 23 Sep 2020 18:47:56 GMT

NightOwl888 opened a new issue #353:

   IndexSearcher has 2 nested classes that are each being instantiated in a tight loop:
   1. [`SearcherCallableNoSort`](
   2. [`SearcherCallableWithSort`](
   Each of these classes implements `ICallable<T>`, an interface that was carried over
from Java. The closest match in .NET is `Func<T>`. Both classes (and their many member
variables) can be eliminated and their `Call()` method placed in the inline body of `Func<T>`,
which will eliminate the class instantiation per loop.
   I suspect this will have a performance impact, but even if not this is a step away from
Java and toward .NET.
   `TaskSchedulerCompletionService.Submit(ICallable<T> task)` should be modified to
accept a `Func<T>` and doesn't need to implement `ICompletionService<T>`.
   We should also aim to factor out (and delete) `ICallable<T>` and `ICompletionService<T>`
from Lucene.NET.

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

View raw message