Bug 147607

Summary: CPP debugger is very slow on steps
Product: [Applications] kdevelop Reporter: Aleksey Midenkov <asm>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED DUPLICATE    
Severity: wishlist    
Priority: NOR    
Version: 3.4.1   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Increases the speed of the debugging process

Description Aleksey Midenkov 2007-07-06 15:17:44 UTC
Version:           3.4.1 (using KDE KDE 3.5.7)
Installed from:    Debian testing/unstable Packages

It turns out that kdevelop debugger redraws its window with frame stack each time a step is occured. And it takes considerable time when there is a lot of threads. Redraw of 20 threads slows down a step approx to 1.5 seconds. Hiding frame stack window does not have any effect on speed.
Comment 1 Anderson Luiz da Silva 2007-08-14 19:04:29 UTC
This problem happens because KDevelop calls -thread-select for every thread, but this information is not very useful until the user open the 'Frame Stack' window.
Comment 2 Andreas Pakulat 2007-08-19 18:50:32 UTC
The Frame Stack window is opened automatically in the current svn version, so this is useful nowadays.
Comment 3 Andreas Pakulat 2008-07-02 00:18:15 UTC
closing as there's no real wish here except "make the integrated debugger faster", which is more-or-less an upstream issue as you'd have the same slowness if you execute the same commands that kdevelop executes.

Also as I said the information is useful and shown-by-default nowadays.
Comment 4 Anderson Luiz da Silva 2008-07-02 02:38:33 UTC
I agree that if one executes the same commands by hand the debugger will take the same time to respond but when debugging direct in gdb I don't need to see neither all threads nor the stack after each step. And when I do need to see them I don't bother to wait a bit. So gdb is slow but I disagree that calling -thread-select for every thread is necessary when the frame stack window is not visible.

I've been using a modified version of KDevelop that only lists threads and stack when the Frame Stack window becomes (or is) visible and it works very well and very faster.

Remember that I'm using an application that has hundreds of threads. Debugging an application with only one or a couple of threads makes the slowness almost imperceptible.
Comment 5 Andreas Pakulat 2008-07-02 08:48:55 UTC
can you attach that patch here? It shouldn't be a problem to integrate it into kdevelop3.
Comment 6 Anderson Luiz da Silva 2008-07-03 13:14:22 UTC
Created attachment 25809 [details]
Increases the speed of the debugging process

Sorry if this patch is not against the HEAD version but, lately, I've been
behind a very restrictive firewall.

Basically it adds a verification so the contents of the frame stack window is
updated only when it is visible.
Comment 7 Aleksey Midenkov 2008-07-03 13:56:17 UTC
Thank you Luiz!

On Thursday 03 July 2008 15:14:23 Anderson Luiz da Silva wrote:
> ------- Additional Comments From andyluiz yahoo com  2008-07-03
> 13:14 ------- Created an attachment (id=25809)
>  --> (http://bugs.kde.org/attachment.cgi?id=25809&action=view)
> Increases the speed of the debugging process
>
> Sorry if this patch is not against the HEAD version but, lately,
> I've been behind a very restrictive firewall.
>
> Basically it adds a verification so the contents of the frame stack
> window is updated only when it is visible.

Comment 8 Thomas McGuire 2008-07-24 21:02:39 UTC

*** This bug has been marked as a duplicate of 143977 ***