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 68381 - Debugger slow for J2ME. Unnecessary JDI calls
Summary: Debugger slow for J2ME. Unnecessary JDI calls
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: PERFORMANCE
Depends on: 59058
Blocks: 69512
  Show dependency tree
 
Reported: 2005-11-09 14:09 UTC by Petr Suchomel
Modified: 2010-04-29 09:27 UTC (History)
3 users (show)

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 Petr Suchomel 2005-11-09 14:09:12 UTC
Umbrella issue for J2ME:
Create file, set breakpoint, delete file.
Breakpoint stays forever, although it is possible to check if the original file
exists and remove it. Persistent over NB restarts.
Leads to call allClasses() method
BreakpointsEngineListener
    private void createBreakpointImpls () {
        Breakpoint[] bs = DebuggerManager.getDebuggerManager ().getBreakpoints ();
        int i, k = bs.length;
        for (i = 0; i < k; i++)
            createBreakpointImpl (bs [i]);
    }
Comment 1 Petr Suchomel 2005-11-09 15:01:48 UTC
ClassBasedBreakpoint.checkLoadedClasses(String className, boolean all)
is called with all == true in many cases
            if (all) {
                i = getVirtualMachine ().allClasses ().iterator ();
            } else {
                i = getVirtualMachine ().classesByName (className).iterator ();
            }

while it seems, the call getVirtualMachine().allClasses() is done because only
for method match (name, className)
which maches for wildcard in package/class name
if (pattern.startsWith ("*"))
if (pattern.endsWith ("*"))

The pattern * is not used many times while doing normal debugging IMHO.
Can be the getVirtualMachine ().allClasses () avoided by adding wild card
checking before calling this method like this?

            if (all && (className.startsWith("*")||className.endsWith("*")) ) {
                i = getVirtualMachine ().allClasses ().iterator ();
            } else {
                i = getVirtualMachine ().classesByName (className).iterator ();
            }
Comment 2 Petr Suchomel 2005-11-09 15:31:05 UTC
Seems like even worse, that allClasses() is called for zombie breakpoints (for
file which does not any more exists and even outside the actual opened project
but had set breakpoint before).
Comment 3 Martin Entlicher 2005-11-09 18:54:35 UTC
FYI: Associated issues: issue #61465 & issue #63595.
Comment 4 Martin Entlicher 2005-12-12 18:28:39 UTC
Fixing issue #59058 may help as well...
Comment 5 Martin Entlicher 2006-08-31 19:54:20 UTC
This should be fixed after the partial fix of issue #55663.
allClasses() is not called if the className pattern does not begin or end with "*".
Comment 6 Quality Engineering 2010-04-29 09:27:21 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.