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 155856 - BrokenReferencesSupport does not need to clone project properties
Summary: BrokenReferencesSupport does not need to clone project properties
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: API, PERFORMANCE
Depends on:
Blocks:
 
Reported: 2008-12-19 18:34 UTC by _ tboudreau
Modified: 2010-03-30 22:10 UTC (History)
0 users

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 _ tboudreau 2008-12-19 18:34:07 UTC
In mobility projects, a user can have many configurations.  The node for each configuration needs to do a check in the
background to decorate itself if broken.  If you have 300 configuration nodes, then with the current code, a copy of the
EditableProperties for the project must be made at least 300 times.

Since BrokenReferencesSupport's use of the project properties is completely internal to the project, it should use some
internal way to query the properties it needs without causing a defensive copy to be made. The defensive copy will never
be passed back to the external calling module anyway.

See also issue 155808

"RP for tmp/MobileApplication1" daemon prio=1 tid=0x00007fcab4339550 nid=0x425c runnable
[0x0000000045529000..0x0000000045529ba0]
        at java.util.ArrayList.<init>(ArrayList.java:136)
        at org.netbeans.spi.project.support.ant.EditableProperties$Item.clone(EditableProperties.java:785)
        at org.netbeans.spi.project.support.ant.EditableProperties.<init>(EditableProperties.java:146)
        at org.netbeans.spi.project.support.ant.EditableProperties.cloneProperties(EditableProperties.java:348)
        at org.netbeans.spi.project.support.ant.ProjectProperties.getProperties(ProjectProperties.java:110)
        at org.netbeans.spi.project.support.ant.AntProjectHelper$5.run(AntProjectHelper.java:671)
        at org.netbeans.spi.project.support.ant.AntProjectHelper$5.run(AntProjectHelper.java:669)
        at org.openide.util.Mutex.readAccess(Mutex.java:285)
        at org.netbeans.spi.project.support.ant.AntProjectHelper.getProperties(AntProjectHelper.java:669)
        at org.netbeans.modules.java.project.BrokenReferencesModel.getReferences(BrokenReferencesModel.java:283)
        at org.netbeans.modules.java.project.BrokenReferencesModel.isBroken(BrokenReferencesModel.java:180)
        at org.netbeans.spi.java.project.support.ui.BrokenReferencesSupport.isBroken(BrokenReferencesSupport.java:115)
        at org.netbeans.modules.mobility.project.J2MEProject.isConfigBroken(J2MEProject.java:209)
        at org.netbeans.modules.mobility.project.ui.OneConfigurationNode.isBroken(OneConfigurationNode.java:99)
        at org.netbeans.modules.mobility.project.ui.DecoratedNode$BrokenStateUpdater.run(DecoratedNode.java:183)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1005)
Comment 1 Antonin Nebuzelsky 2010-03-29 14:10:56 UTC
Change of default owner.
Comment 2 Jesse Glick 2010-03-30 22:05:26 UTC
It cannot use some "internal" way because BRS is in a different module. However EditableProperties.cloneProperties already uses a CoW strategy so this thread dump should be obsolete.

*** This bug has been marked as a duplicate of bug 64174 ***
Comment 3 Jesse Glick 2010-03-30 22:10:23 UTC
Sorry, not a dupe. Was fixed in e1fe97f32c88.