rmuir commented on PR #11987:
URL: https://github.com/apache/lucene/pull/11987#issuecomment-1336398355

   > Hi, another idea about the threadlocals: Why do we need thread locals 
"per" indexreader. A single thread local cannot be used from multiple threads, 
so it does not matter if multiple index readers/writers share the same thread 
locals. Let's do it like it is done for direct buffers inside the JDK's code, 
too: Let StoredFieldsReader allocate a single buffer per thread in a 
conventional ThreadLocal, not a closeable one (which has other problems). That 
is by the way how ThreadLocals are meant to be used.
   > 
   > Of course if one has thread pools with 10.000 Threads like Solr this may 
still a resorce problem, but that's not Lucene's fault.
   > 
   > So my poposal would be: Use a single ThreadLocal (non closeable) for 
decompression buffers in a static final field of the Decompressor class.
   
   I think you are confused. There is much more than just this buffer 
underneath threadlocal today. 


-- 
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

Reply via email to