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 121484 - JavaDoc search module seems to be keeping projects in memory
Summary: JavaDoc search module seems to be keeping projects in memory
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: PERFORMANCE, SIMPLEFIX
Depends on:
Blocks:
 
Reported: 2007-11-08 15:49 UTC by Petr Nejedly
Modified: 2007-12-07 16:32 UTC (History)
2 users (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 Petr Nejedly 2007-11-08 15:49:49 UTC
See e.g. following root path to a project that I don't have opened in my IDE:
NbModuleProject[MasterFileObject@d43b6f[space/nenik/work/nb/core/swing/plaf]]:
private static org.netbeans.modules.javadoc.search.JavadocRegistry
org.netbeans.modules.javadoc.search.JavadocRegistry.INSTANCE->
org.netbeans.modules.javadoc.search.JavadocRegistry@d66dfb-results->
java.util.HashSet@1ea4bd8-map->
java.util.HashMap@191382f-table->
[Ljava.util.HashMap$Entry;@18f3497-[156]->
java.util.HashMap$Entry@17555fa-next->
java.util.HashMap$Entry@d1920d-key->
org.netbeans.modules.apisupport.project.queries.JavadocForBinaryImpl$1@1cbbf42-this$0->
org.netbeans.modules.apisupport.project.queries.JavadocForBinaryImpl@230529-project->
org.netbeans.modules.apisupport.project.NbModuleProject@1ccb4f6
Comment 1 Jan Pokorsky 2007-11-08 17:42:30 UTC
JavadocRegistry keeps what JavadocForBinaryQuery returns and it listens to changes of aquired results. It is a valid use
case IMO. As I can read in your comment the project is referenced by JFBQ.Result of apisupport/project and in addition
to that there is no impl of ChangeEvent support. Reassigning to apisupport/project for evaluation.
Comment 2 Jesse Glick 2007-11-09 09:17:46 UTC
Could easily use a static nested class; the project field is unused anyway.

No plans to implement change listening for this case. Too much work.
Comment 3 Petr Nejedly 2007-11-09 10:14:38 UTC
This looks like a trivial and rally safe fix with no performance implications (i.e. releasing the project won't slow
down  javadoc access once the result is computed, right?).
If it proves it really is enough to free the projects from memory, I would vote for fixing this even for 6.0,
as the memory usage impact can be huge (megabytes of heap in many use cases).
Comment 4 Jesse Glick 2007-11-13 13:43:25 UTC
Checking in JavadocForBinaryImpl.java;
/shared/data/ccvs/repository/apisupport/project/src/org/netbeans/modules/apisupport/project/queries/JavadocForBinaryImpl.java,v
 <--  JavadocForBinaryImpl.java
new revision: 1.15; previous revision: 1.14
done