You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by GitBox <gi...@apache.org> on 2020/10/17 13:00:09 UTC

[GitHub] [lucenenet] theolivenbaum opened a new issue #370: Reduce allocations from current FieldCache implementation

theolivenbaum opened a new issue #370:
URL: https://github.com/apache/lucenenet/issues/370


   Was doing today some more benchmark on our usage of Lucene, and noticed the current design of FieldCache allocates an anonymous class due to the method passed [here](https://github.com/apache/lucenenet/blob/37d7ffdede8918f3bce728647f438de47bd229be/src/Lucene.Net/Search/FieldCacheImpl.cs#L1347):
   
   `````csharp
   NumericDocValues valuesIn = reader.GetNumericDocValues(field);
   if (valuesIn != null)
   {
       // Not cached here by FieldCacheImpl (cached instead
       // per-thread by SegmentReader):
       return new FieldCache.Int64s(get: (docID) => valuesIn.Get(docID));
   }
   `````
   
   In our usage of Lucene, we end up hitting this quite often, as you can see on the trace:
   ![image](https://user-images.githubusercontent.com/8791811/96337735-5f473c00-1089-11eb-880d-1aa849ff7ce6.png)
   
   
   
   I'll investigate if there is any quick win here, and open a PR if so.
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [lucenenet] theolivenbaum commented on issue #370: Reduce allocations from FieldCache

Posted by GitBox <gi...@apache.org>.
theolivenbaum commented on issue #370:
URL: https://github.com/apache/lucenenet/issues/370#issuecomment-711132102


   @NightOwl888 pushed the PR yesterday, #371, let me know if ok or should change something


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [lucenenet] NightOwl888 closed issue #370: Reduce allocations from FieldCache

Posted by GitBox <gi...@apache.org>.
NightOwl888 closed issue #370:
URL: https://github.com/apache/lucenenet/issues/370


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [lucenenet] NightOwl888 commented on issue #370: Reduce allocations from FieldCache

Posted by GitBox <gi...@apache.org>.
NightOwl888 commented on issue #370:
URL: https://github.com/apache/lucenenet/issues/370#issuecomment-725953778


   Fixed in #389


----------------------------------------------------------------
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:
users@infra.apache.org