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 249513 - Slow (10secs) "Apply Code Changes" with many breakpoints in MAVEN project
Summary: Slow (10secs) "Apply Code Changes" with many breakpoints in MAVEN project
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-24 08:19 UTC by NukemBy
Modified: 2015-07-17 01:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
slow apply code changes (13.88 KB, application/octet-stream)
2014-12-24 08:19 UTC, NukemBy
Details
apply-code-changes-and-breakpoints.npss (92.28 KB, application/octet-stream)
2015-04-24 16:52 UTC, NukemBy
Details
apply-code-changes-and-breakpoints.png (64.46 KB, image/png)
2015-04-24 16:52 UTC, NukemBy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NukemBy 2014-12-24 08:19:55 UTC
Created attachment 151267 [details]
slow apply code changes

It takes around 10 seconds of the total wait time to "Apply Code Changes" on maven project. NS Self profiler shows that all time goes to ...maven.debug.DebuggerChecker.reload() -> ... -> ...jpda.breakpoint.BreakpointImpl.update()

Most probably this is caused by the general slowness of the jpda interface in NB, for example during evaluation of variables - see https://netbeans.org/bugzilla/show_bug.cgi?id=249305.

With all breakpoints removed or disabled "Apply Code Changes" works almost instantly, though does not really work all the time :( - see https://netbeans.org/bugzilla/show_bug.cgi?id=247297.

Self profiler snapshot is attached.
Comment 1 Tomas Stupka 2015-04-23 09:53:26 UTC
reassigning for further evaluation
Comment 2 markiewb 2015-04-24 15:38:39 UTC
(In reply to NukemBy from comment #0)
> With all breakpoints removed or disabled "Apply Code Changes" works almost instantly, though does not really work all the time 

Really? I was not aware of this workaround.
Comment 3 NukemBy 2015-04-24 16:52:04 UTC
Strange, but it really is ... just rechecked (for the case if things get changed during last months)

1. With 10 dummy breakpoints Apply Code Changes completes in around 13 seconds,
2. With all of them removed - in around 6 seconds (see attached apply-code-changes-and-breakpoints.npss and apply-code-changes-and-breakpoints.png). Why still 6 seconds? ...

... most probably because of this issue: https://netbeans.org/bugzilla/show_bug.cgi?id=250746. After deleting org-netbeans-modules-debugger-Settings.properties file from NB config folder Apply Code Changes completes in less than half a second.
Comment 4 NukemBy 2015-04-24 16:52:22 UTC
Created attachment 153377 [details]
apply-code-changes-and-breakpoints.npss
Comment 5 NukemBy 2015-04-24 16:52:42 UTC
Created attachment 153378 [details]
apply-code-changes-and-breakpoints.png
Comment 6 Martin Entlicher 2015-07-13 13:31:58 UTC
I do not think that debugger does something wrong here. It makes checks about classes containing breakpoints and these checks are slow. It looks like at the end it's slow because of file access at File.getCanonicalFile().

I'll try to optimize the ClassBasedBreakpoint.compareSourceRoots()...
Comment 7 Martin Entlicher 2015-07-13 17:11:10 UTC
It should be improved by changeset:   289638:5345438151d9
http://hg.netbeans.org/core-main/rev/5345438151d9
Comment 8 Quality Engineering 2015-07-17 01:18:38 UTC
Integrated into 'main-silver', will be available in build *201507170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/5345438151d9
User: mentlicher@netbeans.org
Log: #249513: Cache the source roots to speed up breakpoints checks.