uschindler commented on PR #816: URL: https://github.com/apache/lucene/pull/816#issuecomment-1111262421
In short: ThreadLocals in Analyzers is ok, because even with many threads (100.000 is no problem), because you have a map per thread pointing to few analyzer's threadlocals with a weak reference. But having a ThreadLocal in each SegmentReader is a bad idea, because you register link using the weak ref to the ThreadLocal in every thread, possibly 10.000 Segmentreaders in hundreds of threads over time. -- 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