Author Topic: debugger speed  (Read 21213 times)

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: debugger speed
« Reply #15 on: January 04, 2006, 09:07:12 pm »
Heh, that "website on STL" is the site of the STL implementation used by GCC :)

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: debugger speed
« Reply #16 on: January 04, 2006, 09:16:03 pm »
Heh, that "website on STL" is the site of the STL implementation used by GCC :)
To be honest, I was not aware of this :oops:. Anyway, I find it really helpful (especially when I was implementing a PriorityQueue (wrapper to a multimap) :)) with a lot of term definitions, examples, information and so on.

Michael

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: debugger speed
« Reply #17 on: January 04, 2006, 09:19:53 pm »
PriorityQueue... std::priority_queue<> didn't suit your needs? :)

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: debugger speed
« Reply #18 on: January 04, 2006, 09:37:57 pm »
PriorityQueue... std::priority_queue<> didn't suit your needs? :)
Unfortunately not :D. It was an exam for an advanced course in C++ meta-programming and distribute programming (one of the best course I have ever had, to be honest). The std::priority_queue<> did not fullfil the requirements (it would have been too easy :D). If I remember, indexes of the PriorityQueue were not unique. Therefore, I needed a multimap (with some modifications to fit the requirements). What it was very interesting and not so known was the problem related with elements of a same index :). Their order in the multimap is not fixed. SO, how e.g., would it possible to delete the older element if more than one element has the same index?

Michael

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: debugger speed
« Reply #19 on: January 04, 2006, 11:15:34 pm »
It is kind of useless for people talk about what they might think the bottlenecks in the code are and there solutions.  Someone should go and profile the debugger so we know where most of the actual time in the debugger is being spent.  Then we can start to talk about whether or not to use threads, or wxStringArrays, or Maps vs Vectors.  Or it might be that most of the time is just spent piping the stdin and stdout and there is nothing really to be done in speeding it up, but oops, there I go speculating.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: debugger speed
« Reply #20 on: January 04, 2006, 11:24:30 pm »
Good idea :)
Sorry for my over-enthusiastic attitude (see my sig.)

grv575

  • Guest
Re: debugger speed
« Reply #21 on: January 04, 2006, 11:39:27 pm »
grv575 you can't possibly compare the speed of C::B's debugger with Quincy's... You 're comparing apples with oranges here ;)

Well I'm an optimization freak  :D

But quincy does do watch variables as well and still has instant reponsiveness.  It may have to do with the fact that I'm running a 1.1 ghz centrino as well (tablet - why it's so slow), but the delay is bad enough that you're more inclined to use breakpoints and continue than stepping through 5-10 lines in a function.  Is the gdb verbose mode needed then, or what's it used for over the standard output gdb gives?

I remember the only thing quincy does is:
info f(rame)
every line.  Not sure exactly what for though - maybe to track which thread it is in or something.

IIRC gprof was a no go on the CB source.  Maybe I'll see if there's any good free assembly level call profilers that might be able to zero in on what's taking the most time on this machine.

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Re: debugger speed
« Reply #22 on: January 04, 2006, 11:52:00 pm »
IIRC gprof was a no go on the CB source.  Maybe I'll see if there's any good free assembly level call profilers that might be able to zero in on what's taking the most time on this machine.
Compuware's DevPartner Profiler Community Edition is a free and imho really good and powerfull profiler. However, it is a plugin for Visual Studio and I don't know if it is possible to get Code::Blocks compiled with MS Visual Studio and this profiler. But maybe I'll give it a try if I find some free time.
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: debugger speed
« Reply #23 on: January 04, 2006, 11:58:47 pm »
grv: Is Quincy opensource? We might... *ahem* re-use *ahem* some of its code :lol:

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: debugger speed
« Reply #24 on: January 05, 2006, 12:36:52 am »
IIRC gprof was a no go on the CB source.  Maybe I'll see if there's any good free assembly level call profilers that might be able to zero in on what's taking the most time on this machine.

You have to enable profiling only for one target at a time, not globally in project. This happens because, unfortunately, you can't specify an output file when using -pg...
So, just enable profiling on the debugger plugin only and you got yourself some profiling info ;)

Note though, that I 'm not finished with the debugger plugin. It has some optimization opportunities but it's still early for it...
« Last Edit: January 05, 2006, 12:38:45 am by mandrav »
Be patient!
This bug will be fixed soon...

grv575

  • Guest
Re: debugger speed
« Reply #25 on: January 05, 2006, 01:08:28 am »
grv: Is Quincy opensource? We might... *ahem* re-use *ahem* some of its code :lol:

"Quincy is freeware open-source."
http://www.codecutter.net/tools/quincy/

The source is 300k.  Haven't looked at it yet though.  I do know it's using gdb 5.2.1 and not the newer 6.3 but still could be useful to salvage some of the source anyway.

grv575

  • Guest
Re: debugger speed
« Reply #26 on: January 05, 2006, 04:16:19 am »
Compiling the latest source and running through the debugger again, it looks like I may have been a little harsh about the speed.  It's actually perfectly usable (F7 stepping) on my machine.  Optimization of course isn't a bad thing - I think I'll still profile it just out of curiosity - but it's decent enough to not be unacceptably slow.  Guess I remembered it taking longer to move the carret in previous builds, but as it is it gives a decent speed impression.

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: debugger speed
« Reply #27 on: January 05, 2006, 08:24:17 am »
Compiling the latest source and running through the debugger again, it looks like I may have been a little harsh about the speed.  It's actually perfectly usable (F7 stepping) on my machine.  Optimization of course isn't a bad thing - I think I'll still profile it just out of curiosity - but it's decent enough to not be unacceptably slow.  Guess I remembered it taking longer to move the carret in previous builds, but as it is it gives a decent speed impression.


did you ever test an optimized ( by compiler switches ) build of CB ???  ( normal project file is for a debug build
and the update command only strips the output files, but no optimizations are done )

test this out (if you have another GB space left on your HD)  - you'll be astonished !

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: debugger speed
« Reply #28 on: January 05, 2006, 08:28:21 am »
My binary snapshots are already compiled with optimization flags, that would save him almost the whole GB :)

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: debugger speed
« Reply #29 on: January 05, 2006, 08:50:43 am »
My binary snapshots are already compiled with optimization flags, that would save him almost the whole GB :)

thanks Ceniza  -  now  I know how i can save a GB  :D