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 59058 - Improve performance of children in views
Summary: Improve performance of children in views
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 57410 68381
  Show dependency tree
 
Reported: 2005-05-19 13:32 UTC by Martin Entlicher
Modified: 2010-04-29 09:22 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Entlicher 2005-05-19 13:32:31 UTC
The view model is asked every time for children count and subsequently for
children. This causes two times more communication than necessary, for most models.
Comment 1 Martin Entlicher 2005-05-19 13:34:13 UTC
Either the children can be cached between getChildrenCount() and getChildren()
calls, or getChildren(Object node) method would have to be introduced.
Comment 2 Martin Entlicher 2005-05-19 13:41:02 UTC
Also the contract is not much clear. The number of children can change between
getChildrenCount() and getChildren() calls. Therefore getChildren() must be
robust enough to check for "from" and "to" parameters being out of bounds.
Therefore one can also use getChildren(Object node, 0, Integer.MAX_VALUE), right?
Comment 3 Martin Entlicher 2005-10-06 17:18:18 UTC
The call getChildren(Object node, 0, Integer.MAX_VALUE) can cause problems in
models, which count on values returned by getChildrenCount() without additional
checks (static, or somehow synchronized models).
A little less offensive would be to return Integer.MAX_VALUE from
getChildrenCount() in specific models and adjust the "to" argument in
getChildren(). - After issue #57573 is fixed, this should not impose any problems.
Comment 4 Martin Entlicher 2006-09-07 14:54:03 UTC
*** Issue 57410 has been marked as a duplicate of this issue. ***
Comment 5 Martin Entlicher 2006-09-08 14:55:13 UTC
We return Integer.MAX_VALUE in getChildrenCount() so that we do not have to
compute the children twice:

/cvs/debuggercore/src/org/netbeans/modules/debugger/ui/models/BreakpointsTreeModel.java,v
 <--  BreakpointsTreeModel.java
new revision: 1.10; previous revision: 1.9

/cvs/debuggercore/src/org/netbeans/modules/debugger/ui/models/SessionsTreeModel.java,v
 <--  SessionsTreeModel.java
new revision: 1.7; previous revision: 1.6

/cvs/debuggercore/src/org/netbeans/modules/debugger/ui/models/WatchesTreeModel.java,v
 <--  WatchesTreeModel.java
new revision: 1.10; previous revision: 1.9

/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/CallStackTreeModel.java,v
 <--  CallStackTreeModel.java
new revision: 1.18; previous revision: 1.17

/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/ClassesTreeModel.java,v
 <--  ClassesTreeModel.java
new revision: 1.15; previous revision: 1.14

/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/LocalsTreeModel.java,v
 <--  LocalsTreeModel.java
new revision: 1.39; previous revision: 1.38

/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/ThreadsTreeModel.java,v
 <--  ThreadsTreeModel.java
new revision: 1.8; previous revision: 1.7

/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/WatchesModel.java,v
 <--  WatchesModel.java
new revision: 1.31; previous revision: 1.30

/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/FixedWatchesManager.java,v
 <--  FixedWatchesManager.java
new revision: 1.17; previous revision: 1.16

/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/models/MonitorModel.java,v
 <--  MonitorModel.java
new revision: 1.16; previous revision: 1.15

/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/models/SourcesModel.java,v
 <--  SourcesModel.java
new revision: 1.18; previous revision: 1.17

/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/models/VariablesTreeModelFilterSI.java,v
 <--  VariablesTreeModelFilterSI.java
new revision: 1.12; previous revision: 1.11
Comment 6 Quality Engineering 2010-04-29 09:22:42 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.