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 46629 - o.n.mdr.handlers.gen.HandlerGenerator wasting memory
Summary: o.n.mdr.handlers.gen.HandlerGenerator wasting memory
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Martin Matula
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2004-07-27 18:43 UTC by _ rkubacki
Modified: 2004-08-13 12:11 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-07-27 18:43:08 UTC
o.n.mdr.handlers.gen.HandlerGenerator.customImplInfos
is a HashTable<Class,HashSet<String>> object
containing signatures for generated handlers. It
occupies 420kB on heap and it is never GC'ed. 

I do not know why we need this table but if we
really use it should be more memory friendly. At
least there is a lot of repeated method signatures
where we can share strings. Maybe we can
reconsider the whole heavy use of reflection.
Comment 1 Martin Matula 2004-07-28 13:05:41 UTC
Fixed. customImplInfos has been transfored into a LRU cache of a
limited size (5) rather than a static hashmap that is never collected.

Checking in src/org/netbeans/mdr/handlers/gen/HandlerGenerator.java;
/cvs/mdr/src/org/netbeans/mdr/handlers/gen/HandlerGenerator.java,v 
<--  HandlerGenerator.java
new revision: 1.13; previous revision: 1.12
done