This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 61299

Summary: Too many IndexBuilder threads running
Product: java Reporter: Jesse Glick <jglick>
Component: JavadocAssignee: Jan Pokorsky <jpokorsky>
Status: RESOLVED FIXED    
Severity: blocker Keywords: PERFORMANCE, THREAD
Priority: P2    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Thread dumps (GZIPped)

Description Jesse Glick 2005-07-22 16:29:35 UTC
Dev build, Mustang. I tried to Open Required Projects on nbbuild (i.e. all NB
modules). IDE froze with 100% CPU. I know it's normally slow, but this looked
wrong. Some thread dumps showed that javadoc.search.IndexBuilder was running in
several threads the whole time. I don't know if that's what was consuming so
much CPU, but it looks incorrect. Reading the IB source code, I don't see how it
could be using multiple threads; I think it's not supposed to.
Comment 1 Jesse Glick 2005-07-22 16:30:38 UTC
Created attachment 23242 [details]
Thread dumps (GZIPped)
Comment 2 Jesse Glick 2005-07-22 16:36:13 UTC
...and IndexBuilder still runs even if you disable the Javadoc module, unless
you restart the IDE first!
Comment 3 Jesse Glick 2005-07-22 16:45:08 UTC
Update: with Javadoc module disabled, and after restarting the IDE, I can open
all NB modules. Not exactly fast, the screen doesn't repaint for a few seconds,
and Java classpath scanning takes a while, but it works at least. So I think
there is something wrong in javadoc. (I counted 30 threads running IndexBuilder
in a single thread dump snapshot!)
Comment 4 Jan Pokorsky 2005-07-25 17:31:04 UTC
It is reproducible even with jdk 1.5. I replaced the default RP with a named RP
using throughput 1 since the task created by the default RP seems to create new
thread on each scheduling.

Fixed in

/cvs/javadoc/src/org/netbeans/modules/javadoc/search/IndexBuilder.java
new revision: 1.12; previous revision: 1.11