[ https://issues.apache.org/jira/browse/LUCENE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17174461#comment-17174461 ]
David Smiley commented on LUCENE-2822: -------------------------------------- [~uschindler] (or anyone), is System.nanoTime still considered expensive in modern JVMs to call once per collected doc? You commented about it's expense above. Alternatively, nanoTime could be called when the doc collection delta exceeds say 100 docs since the last nanoTime check. I'm digging this old issue up because, where I work, we've got some improvements to this utility many years ago relating to dealing with Thread starvation under load. As I look at it, I just don't like this Thread here at all, so I'm wondering if we can just remove it instead of enhancing it's existing mechanism. > TimeLimitingCollector starts thread in static {} with no way to stop them > ------------------------------------------------------------------------- > > Key: LUCENE-2822 > URL: https://issues.apache.org/jira/browse/LUCENE-2822 > Project: Lucene - Core > Issue Type: Bug > Reporter: Robert Muir > Assignee: Simon Willnauer > Priority: Major > Fix For: 3.5, 4.0-ALPHA > > Attachments: LUCENE-2822.patch, LUCENE-2822.patch, LUCENE-2822.patch, > LUCENE-2822.patch > > > See the comment in LuceneTestCase. > If you even do Class.forName("TimeLimitingCollector") it starts up a thread > in a static method, and there isn't a way to kill it. > This is broken. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org