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 48449 - PropertyEvaluators contain many duplicit String instances
Summary: PropertyEvaluators contain many duplicit String instances
Status: CLOSED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 42682
  Show dependency tree
 
Reported: 2004-09-03 12:04 UTC by Petr Nejedly
Modified: 2006-03-24 09:53 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 Petr Nejedly 2004-09-03 12:04:09 UTC
After opening java/j2seproject its subprojects,
I've relalized that I have >3000 instances of a
String
"/space/nenik/work/NB_genuine/nbbuild/netbeans/ide4...................."
These strings are held from maps from
org.netbeans.spi.project.support.ant.PropertyUtils$SequentialPropertyEvaluator
There are 40 instances of the evaluator, which
together reference over 12.000 Strings, most of
them duplicit.
Here is the profile:
org.netbeans.spi.project.support.ant.PropertyUtils$SequentialPropertyEvaluator:40/1280B
[Ljava.util.HashMap$Entry;: 40/75392B
java.util.HashMap: 40/1600B
[C: 12510/1367080B
java.util.HashMap$Entry: 12529/300696B
java.lang.String: 12540/300960B
Total: 37699/2047008B

The Strings with their char[] consume >1.6MB out
of ~2MB used there. Removing duplicities and
trimming these Strings should save at least 1MB of
heap.
Comment 1 Jesse Glick 2004-09-03 21:21:39 UTC
Will see if I can collapse some, thanks for the tip.
Comment 2 Jesse Glick 2004-09-08 21:17:30 UTC
Seemed to be specific to NBM projects. One-line fix.
Comment 3 Jesse Glick 2004-09-08 23:02:53 UTC
Along with other stuff in:

committed   * Up-To-Date  1.46       
apisupport/project/src/org/netbeans/modules/apisupport/project/NbModuleProject.java
Comment 4 Petr Nejedly 2004-09-09 09:53:47 UTC
OK now.