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 230180

Summary: org.openide.nodes.Children$Keys.applyKeys: LowPerformance - EDT waiting for Children.MUTEX
Product: platform Reporter: Exceptions Reporter <exceptions_reporter>
Component: Data SystemsAssignee: Jaroslav Havlin <jhavlin>
Status: NEW ---    
Severity: normal CC: aquaglia, davidhbrown
Priority: P3 Keywords: PERFORMANCE
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 199987
Attachments: nps snapshot

Description Exceptions Reporter 2013-05-23 13:35:30 UTC
Build: NetBeans IDE 7.3 (Build 201302132200)
VM: Java HotSpot(TM) Client VM, 23.21-b01, Java(TM) SE Runtime Environment, 1.7.0_21-b11
OS: Windows 7

User Comments:
GUEST: Started up netbeans and it took several minutes to start and has been taking several minutes since, I think I installed emmet plugin, not to sure though as I think I had a problem with netbeans before on this computer.

aquaglia: Starting up

GUEST: tomcat starting up



Maximum slowness yet reported was 45391 ms, average is 24158
Comment 1 Exceptions Reporter 2013-05-23 13:35:32 UTC
Created attachment 134812 [details]
nps snapshot
Comment 2 Ondrej Vrabec 2015-03-06 12:21:58 UTC
org.openide.loaders.FolderChildren.createNode(FolderChildren.java:260) calls DataObject.find => stuck somewhere down waiting for ModuleManager
Comment 3 Jaroslav Havlin 2015-09-24 15:51:58 UTC
Snapshots:

In all cases, EDT is waiting for Children.MUTEX.

769931: ProjectsRootNode is reading source groups under the MUTEX.

773090: ProjectTab.keepExpansion calls DataObject find under the MUTEX.
        Maybe DataObjects can be initialized before expanding the tree.

781336: EntrySupportLazy.setEntriesSimple calls HashSet.removaAll(ArrayList )
Comment 4 Jaroslav Havlin 2015-09-24 16:04:22 UTC
(I'm sorry for accidentally submitting previous comment.)

Snapshots:

In all cases, EDT is waiting for Children.MUTEX.

769931: ProjectsRootNode is reading source groups under the MUTEX.

773090: ProjectTab.keepExpansion calls DataObject find under the MUTEX.
        - Maybe DataObjects can be initialized before expanding the tree.

781336: EntrySupportLazy.setEntriesSimple() calls HashSet.removaAll(collection)
        - The collection is an instance of ArrayList. Using HashSet instead
          or converting to HashSet may help if the collection is big.
          In this case, removeAll took 49 s.

I'm ignoring snapshots from older releases. Thank you for understanding.
Comment 5 Jaroslav Havlin 2015-10-30 11:45:10 UTC
> 781336: EntrySupportLazy.setEntriesSimple() calls HashSet.removaAll(collection)
>        - The collection is an instance of ArrayList. Using HashSet instead
>          or converting to HashSet may help if the collection is big.
>          In this case, removeAll took 49 s.
Fixed: http://hg.netbeans.org/core-main/rev/2997f8301b29
Comment 6 Quality Engineering 2015-10-31 02:25:44 UTC
Integrated into 'main-silver', will be available in build *201510310002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/2997f8301b29
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #230180: Fix slow hashSet.removeAll(bigArrayList)