uschindler commented on PR #15428: URL: https://github.com/apache/lucene/pull/15428#issuecomment-3554134593
Hi, > Would it make sense to use virtual threads and create a local executor internally, instead of making the callers pass one? Maybe create a helper function that opens and returns a `SegmentReader[]` array from a provided `SegmentInfos`... We don't want to create threads in Lucene "automatucally". Of course a virtual thread would not consume resources, but it is not helpful here. Lucene does not hand over threads back to the VM because it does not do "native" IO. It primarily uses MMap and when there are no syscalls, the virtual thraeds won't run in parallel. Please remember; Lucene's CPU usage is bound to CPU and theres no waiting time (e.g., for resources or similar), so virtual threads don't help. You need real threads here, so a Executor is the only way to go. Uwe -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
