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 243724

Summary: org.openide.nodes.FilterNode$FilterLookup$ProxyResult.updateLookup: LowPerformance took 100659 ms.
Product: platform Reporter: Exceptions Reporter <exceptions_reporter>
Component: NavigatorAssignee: Jan Peska <JPESKA>
Status: NEW ---    
Severity: normal CC: amodev, dcremonini, everflux, jtulach, ktincheva, marcoplpl, ProCOmputer
Priority: P3 Keywords: PERFORMANCE
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 209049
Bug Depends on: 201661, 235748    
Bug Blocks:    
Attachments: nps snapshot

Description Exceptions Reporter 2014-04-10 10:59:03 UTC
This bug was originally marked as duplicate of bug 235748, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 8.0 (Build 201403101706)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.51-b03, Java(TM) SE Runtime Environment, 1.7.0_51-b13
OS: Windows 7

User Comments:
GUEST: just working



Maximum slowness yet reported was 100659 ms, average is 100659
Comment 1 Exceptions Reporter 2014-04-10 10:59:19 UTC
Created attachment 146667 [details]
nps snapshot
Comment 2 Jan Peska 2014-04-11 10:00:08 UTC
*** Bug 243722 has been marked as a duplicate of this bug. ***
Comment 3 Jan Peska 2014-07-23 07:18:44 UTC
Original bug was assigned to Lookup and there is a lot of "lookup stuff" happening in this new snapshot -> reassigning to Lookup for further evaluation.
Comment 4 Jaroslav Tulach 2014-07-28 14:41:54 UTC
Hele Honzo, I don't want to be rude, but where do you see a lot of stuff happening in the lookup? Maybe you see that in

org.openide.nodes.NodeLookup.updateLookupAsCookiesAreChanged()	99.8553	90 503 ms (99,9%)	90 503 ms	329

but that is piece of code also belongs to nodes...
Comment 5 Jaroslav Tulach 2014-07-28 14:44:28 UTC
This problem may be related to issue 235748, but apparently it is still happening after the bug 235748 fix.
Comment 6 Jaroslav Tulach 2014-07-28 14:57:27 UTC
Further investigations are interesting. The calls go through navigator - a code that has been added by Tomáš Pávek as fix for bug 201661. The code is relatively dangerous - it asks for Object.class:

for (Node n : nodes) {
  if (!panelLookup.lookupResult(Object.class).allInstances().containsAll(
  n.getLookup().lookupResult(Object.class).allInstances())
  ) {
    l.add(n.getLookup());
  }
}

Moreover it does its query over each selected node - e.g. the more nodes user selects, the more dangerous the result can be. If the code could be rewritten to ask for some more specific class, the behavior would improve, as there is:

       if (template.getType().isAssignableFrom(node.getClass()) 

in FilterNode and this condition is true for anything when one asks for Object. 

Passing the Navigator to investigate whether the lookupResult(Object.class) can be rewritten a bit.
Comment 7 Jan Peska 2014-07-30 06:50:24 UTC
I'm afraid that navigator has to ask for all objects in lookup, because in the original bug is mentioned that all objects from active nodes lookup have to be in the panel lookup. So it seems this check is necessary.