Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 94321 - (Mprops + 2) x N queries for property sets when N nodes selected
(Mprops + 2) x N queries for property sets when N nodes selected
Status: VERIFIED FIXED
Product: platform
Classification: Unclassified
Component: Explorer
5.x
All All
: P2 (vote)
: 6.x
Assigned To: Stanislav Aubrecht
issues@platform
release55_fixes_fixed
:
Depends on:
Blocks: 84275
  Show dependency treegraph
 
Reported: 2007-02-05 10:18 UTC by Viktor Lapitski
Modified: 2008-12-22 11:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
ProxyNode.java.diff (3.83 KB, application/octet-stream)
2007-02-05 10:28 UTC, Viktor Lapitski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Viktor Lapitski 2007-02-05 10:18:08 UTC
Lets say there are N nodes of the same type. Lets say a node 
has M properties in its property set. Selecting these nodes 
 will cause each node to be queried (M+2) times for a full property 
set, which is at least (M+1) times too much.  Ie. for example 
selecting 74 UML class nodes will cause 1184 queries (16 queries 
per node) instead of only necessary 74 queries.

These M+2 times a node is queried for its full propery set from 
org.openide.explorer.propertysheet.ProxyNode.computePropertySets 
and 
org.openide.explorer.propertysheet.ProxyNode.createProxyProperty
methods. Attached patch illustrates the problem and decreases the number 
of queries from M+2 to just 1 per node. In case of UML project class nodes 
it means for example  15 times decrease in the time spent to 
compute property sets (from 11 sec. (1184 queries) to 0.7 sec. (74 queries) 
on Intel Centrino Duo 2.33GHz for 74 nodes)

The above mentioned queries  result from the call stack below:
...
        at
org.openide.explorer.propertysheet.ProxyNode.computePropertySets(ProxyNode.java:248)
        at
org.openide.explorer.propertysheet.ProxyNode.createSheet(ProxyNode.java:129)
        at org.openide.nodes.AbstractNode.getSheet(AbstractNode.java:404)
        at org.openide.nodes.AbstractNode.getPropertySets(AbstractNode.java:415)
        at
org.openide.explorer.propertysheet.PropertySheet.setCurrentNode(PropertySheet.java:568)
        at
org.openide.explorer.propertysheet.PropertySheet.doSetNodes(PropertySheet.java:382)
....
Comment 1 Viktor Lapitski 2007-02-05 10:28:55 UTC
Created attachment 38021 [details]
ProxyNode.java.diff
Comment 2 Stanislav Aubrecht 2007-02-12 16:23:15 UTC
fixed in trunk

/cvs/openide/explorer/src/org/openide/explorer/propertysheet/ProxyNode.java,v 
<--  ProxyNode.java
new revision: 1.7; previous revision: 1.6
Comment 3 pgebauer 2007-03-01 13:04:19 UTC
The issue has been fixed in the release551 branch.
Checking in ProxyNode.java;
/cvs/openide/explorer/src/org/openide/explorer/propertysheet/ProxyNode.java,v 
<--  ProxyNode.java
new revision: 1.1.14.1.2.1.22.1; previous revision: 1.1.14.1.2.1
done
Comment 4 pgebauer 2007-03-02 23:48:08 UTC
The issue has been fixed in the release55_fixes branch.
Checking in ProxyNode.java;
/cvs/openide/explorer/src/org/openide/explorer/propertysheet/ProxyNode.java,v 
<--  ProxyNode.java
new revision: 1.1.14.1.2.1.20.1; previous revision: 1.1.14.1.2.1
done
Comment 5 Peter Lam 2007-04-03 22:34:37 UTC
verified in the final NB 5.5 with fixes in the nbms applied along with build
070322 of UML module.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo