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 269898

Summary: very slow step actions
Product: cnd Reporter: Vladimir Voskresensky <vv159170>
Component: DebuggerAssignee: Maria Tishkova <mromashova>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: Dev   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: experimental patch
fast steps log
slow steps log
fast step with new UI

Description Vladimir Voskresensky 2017-02-22 12:48:29 UTC
I use gdb as a debugger and each step* actions take 2-5 sec to execute.
Comment 1 Vladimir Voskresensky 2017-02-22 12:50:11 UTC
I closed all Debugger views: Variables, Stack
and Watch is empty and closed as well. Still very slow
I can send slow_steps.log if needed.
Comment 2 Vladimir Voskresensky 2017-02-22 12:51:19 UTC
The problem is with our "-stack-list-arguments 1" request per step.
I modified it a little (see patch) and now debugger is instant like in command line
Comment 3 Vladimir Voskresensky 2017-02-22 12:53:37 UTC
Created attachment 163690 [details]
experimental patch

experimental patch to evaluate "-stack-list-arguments 0"
Comment 4 Vladimir Voskresensky 2017-02-22 12:54:34 UTC
Created attachment 163691 [details]
fast steps log
Comment 5 Vladimir Voskresensky 2017-02-22 12:54:57 UTC
Created attachment 163692 [details]
slow steps log
Comment 6 Vladimir Voskresensky 2017-02-22 13:01:15 UTC
The proposal is to introduce combo-box in Tools->Options->C++->Debugger:
- use 0 as a default, but allow use to select view mode for 0,1,2

from doc:
https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Stack-Manipulation.html
If print-values is 0 or --no-values, print only the names of the variables; if it is 1 or --all-values, print also their values; and if it is 2 or --simple-values, print the name, type and value for simple data types, and the name and type for arrays, structures and unions. If the option --no-frame-filters is supplied, then Python frame filters will not be executed.
Comment 7 Vladimir Voskresensky 2017-02-22 13:03:34 UTC
Btw, I have tried "2" and it as slow as "1" when debug clang,
but may be for normal binaries it wouldn't so slow.
That's why may be 2 is more friendly that 0, but I still need a way to set to '0' for my usecase
Comment 8 Maria Tishkova 2017-02-28 11:12:02 UTC
New check box added into Tools-> Options -> C/C++-> Debugging
You can turn off arguments values request for Cal Stack and Debugging View
Even if it is turned on but Call Stack View and Debugging view are both closed Step will work fast. 
suggested patch is in attach
Comment 9 Maria Tishkova 2017-02-28 11:13:07 UTC
Created attachment 163730 [details]
fast step with new UI
Comment 10 Maria Tishkova 2017-03-05 18:42:14 UTC
fixed in enum/release82 - should be transplanted into the trunk and releases(release82)

changeset:   314363:825aa2be209e
branch:      release82
parent:      314306:31263a5a432b
user:        Maria Dalmatova <mromashova@netbeans.org>
date:        Sun Mar 05 21:01:51 2017 +0300
summary:     fixed bz#269898 - very slow step actions
Comment 11 Quality Engineering 2017-03-07 02:48:02 UTC
Integrated into 'main-silver', will be available in build *201703070002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/4d43e96023fa
User: Maria Dalmatova <mromashova@netbeans.org>
Log: fixed bz#269898 - very slow step actions
New check box added into Tools-> Options -> C/C++-> Debugging
You can turn off arguments values request for Cal Stack and Debugging View
Even if it is turned on but Call Stack View and Debugging view are both closed Step will work fast.
(transplanted from 825aa2be209e04ad0647d2b96b3e072ccca90e8b)
Comment 12 ilia 2017-04-12 12:51:37 UTC
https://netbeans.org/bugzilla/show_bug.cgi?id=269898 Changesets:
    http://hg.netbeans.org/releases/rev/825aa2be209e # fixed bz#269898 - very slow step actions
    http://hg.netbeans.org/releases/rev/92c0d2a9a5dc # added fix to bz#269898 - i18n