uschindler commented on issue #15079: URL: https://github.com/apache/lucene/issues/15079#issuecomment-3197568393
Yes, but this was exactly like that before. Mike also used NRTCachingDirectory before. The bigger problem with IndexInputs is that we have many more of them. In fact the problem with the ByteBuffersDirectory is that is uses multiple buffers behind scenes and not a single one. When you replace that by a MemorySegmentIndexInput on a byte arry or an anonymous mapping (not needed), it will use the Multi-Impl again. P.S.: In the heap profile there's no MultiSegmentImpl (search for it, you will only find SingleSegmentImpl): https://benchmarks.mikemccandless.com/2025.08.06.18.04.40.html In addition for the above issue the type pollution is only relevant for the above problem if you call a method which exists in more than zwo implementations. For the above "hot" method `org.apache.lucene.store.MemorySegmentIndexInput#readGroupVInt()` there exists exactly ONE (optimized) implementation in mmapdir and another one in the IndexInput base class. -- 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. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org