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 95567 - Low performance of Local Variables View in gdb-lite
Summary: Low performance of Local Variables View in gdb-lite
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 5.x
Hardware: PC All
: P2 blocker (vote)
Assignee: _ gordonp
URL:
Keywords: PERFORMANCE
: 96612 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-02-14 14:59 UTC by Maria Tishkova
Modified: 2009-06-25 10:59 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maria Tishkova 2007-02-14 14:59:32 UTC
1. Start NetBeans +CND
2. Create Sample project Quote
3. Build and use Step into Project
4. Open Local Variables View: you will see Please wait.. message which will be
replaced with the local variables view in about 4 seconds
5. Push Step Over -> the Local Variables View contains "Please wait..." message
again and looks like the whole list of local variables is constructed and
painted again in the view. It will take again about 4 seconds to paint local
variables list. And 

If you will close Local Variables view and then open it again you will see the
same picture with "Please wait..." message.

I have set  the priority to P2 as this is gdb-lite performance issue which looks
kind of critical for users.
Comment 1 _ gordonp 2007-05-01 15:40:09 UTC
I've been adding some performance metrics so I can do before and after
comparisons on this issue. While doing so I discovered that a huge nunber
of var-create and data-evaluate-expression messages are sent to gdb.

Using gvim as my test program, I set a breakpoint in mf_open and ran with
"-f -g" flags. I continued the 1st time I stopped at mf_open and then typed
":e buffer.c". This resulted in 60 var-creates and 75 data-evaluate-expressions.
Since each of these commands gets a gdb response, it looks like we have 100+
round-trip messages sent to gdb after the stop and before the locals view is
displayed!

Among other things, the data is requested whether or not the locals view is
visible. It also drills down into structs and requests data even though the
tree turner may not be open and the requested data may not be shown. I suppose
this makes it quicker to open the turner, but at the expense of waiting for
all data before the view displays.
Comment 2 _ gordonp 2007-05-01 15:48:24 UTC
Slight correction. The data is requested only if the locals view is
displayed. However, it does deep-dive regardless of turner state.
Comment 3 _ gordonp 2007-05-23 01:05:27 UTC
*** Issue 96612 has been marked as a duplicate of this issue. ***
Comment 4 _ gordonp 2007-07-04 00:55:50 UTC
Performance is now acceptable. Note that local variables updates will be ignored if fast stepping.
When the data comes back from gdb, if the debugger state is no longer stopped then the var isn't
updated. As soon as you stop stepping, it gets updated (assuming its still in scope).

Stopping in vim's mf_open (a function with 8 arguments, 2 of which are abstract), I can step several
times a second (although the update is dropped if I step that fast). If I slow down and step about
twice a second I see the update (in this case, its an integer loop counter).

There are still some problems in the locals view, but performance is no longer a problem!