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 48183 - Eager IndexSearch IndexBuilder classes in javadoc module
Summary: Eager IndexSearch IndexBuilder classes in javadoc module
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Javadoc (show other bugs)
Version: 4.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2004-08-30 17:00 UTC by _ rkubacki
Modified: 2005-12-19 13:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2004-08-30 17:00:31 UTC
Once user touches IndexSearch class as a part of
javadoc support it initializes a bunch of things
and never releases them.

It staticaly keeps icons thought we already have a
cache in the IDE.

IndexSearch is staticaly held and never released.
It means everything referenced from it is held
forever.

IndexBuilder holds a singleton instance in static
field too and also it keeps a
RequestProcessor$Task that cannot be GCed and big
part of Java heap is reachable from it. This is
instantiated once you traverse through View menu
to load javadoc indices.
Comment 1 Jan Pokorsky 2004-09-21 15:11:17 UTC
IndexSearch and AutoComment top components optimized:
  * icons are not staticly held any more (IndexSearch, AutoCommentPanel)
  * IndexSearch, AutoCommentTopComponent singletons are GCed properly now
  * IndexSearchThread implements Runnable instead of subclassing
Thread now
    since there is no reason for Thread usage -> RP was used anyway;
    issue: ThreadGroup never released the reference to the thread so
IndexSearch was not GCed

/cvs/javadoc/src/org/netbeans/modules/javadoc/comments/TagPanel.java
new revision: 1.11; previous revision: 1.10
/cvs/javadoc/src/org/netbeans/modules/javadoc/comments/AutoCommentPanel.java
new revision: 1.54; previous revision: 1.53
/cvs/javadoc/src/org/netbeans/modules/javadoc/search/IndexSearchThread.java
new revision: 1.19; previous revision: 1.18
/cvs/javadoc/src/org/netbeans/modules/javadoc/search/IndexSearch.form
new revision: 1.15; previous revision: 1.14
/cvs/javadoc/src/org/netbeans/modules/javadoc/search/IndexSearch.java
new revision: 1.63; previous revision: 1.62
Comment 2 Jan Pokorsky 2004-09-21 15:27:59 UTC
The IndexBuilder singleton holds all computed data weakly so even if
it is not GCed its memory consumption should not be significant.
Comment 3 Milan Kubec 2005-07-15 09:00:07 UTC
Radime, plase verify this issue. Thanks.
Comment 4 Max Sauer 2005-12-19 13:18:36 UTC
Radime, could you please verify this? Thanks.