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.
Summary: | Make stepping as fast as possible. | ||
---|---|---|---|
Product: | debugger | Reporter: | Martin Entlicher <mentlicher> |
Component: | Java | Assignee: | Martin Entlicher <mentlicher> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jtulach |
Priority: | P2 | Keywords: | PERFORMANCE, USABILITY |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | 157767, 190080 | ||
Bug Blocks: |
Description
Martin Entlicher
2010-05-21 15:13:30 UTC
The solution is to cancel variable refreshing as soon as a next step is issued. This will allow the next step to be immediately executed. It still need to wait till a current method invocation completes (if any), but any other scheduled method invocation should be canceled. The action providers need to cancel the variables refreshing which is being performed in debugger's request processor. This needs to be done before doLazyAction() call, because the action itself is run in an RP that is occupied by variables refreshing tasks. Not only variable refreshing needs to be canceled. Retrieval of the call stack and retrieval of location information of every stack frame also takes time. This information is used for annotation in Editor and display in Debugging view. ReferenceType.locationsOfLine() which is used in Step Into is inefficient. It iterates through all methods in the type and retrieves their line number table. The time it takes is proportional to the number of methods. Actions Make Caller Current and Make Callee Current are inefficient as well, they retrieve the whole call stack. This is not really necessary. DebuggingTreeModel should not recompute children if the Debugging view is not visible. Some changes that improve the stepping performance in general were applied: Change the test of thread stack depth to improve performance changeset: 175972:85411ba726c4, http://hg.netbeans.org/main/rev/85411ba726c4 When comparing stack frames, compare just their locations changeset: 175973:3edc6280cb9e, http://hg.netbeans.org/main/rev/3edc6280cb9e Search for line locations in a concrete method, rather then the whole class type. Do not use ReferenceType.locationsOfLine() changeset: 175974:67180d322efb, http://hg.netbeans.org/main/rev/67180d322efb Do not retrieve the whole stack trace when just checking the stack depth in Make Caller Current and Make Callee Current actions changeset: 175976:c6b072704378, http://hg.netbeans.org/main/rev/c6b072704378 Detach listeners when the Debugging view is not visible so that the children are not being refreshed changeset: 175977:1268e3f00b17, http://hg.netbeans.org/main/rev/1268e3f00b17 Load call stack frames with a delay to improve performance changeset: 175978:b9ec58f671f2, http://hg.netbeans.org/main/rev/b9ec58f671f2 Integrated into 'main-golden', will be available in build *201008210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/85411ba726c4 User: mentlicher@netbeans.org Log: #186517 Change the test of thread stack depth to improve performance. The variable models should cancel evaluations as soon as the step is scheduled. This can be made as a model filter. Therefore adding dependency on issues #190080 and #157767 Variables refreshing is canceled as soon as a step action is scheduled. This should allow the step to be executed as soon as possible. Implemented in changeset: 177448:762b245da2cb http://hg.netbeans.org/main/rev/762b245da2cb Integrated into 'main-golden', will be available in build *201009150000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/762b245da2cb User: mentlicher@netbeans.org Log: #186517 Implemented blocking of evaluations in Variables and Watches view when debugger actions are pending. This speeds up consecutive stepping. |