Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
modifications on the profiler plugin (cosmethical)
frithjofh:
Hi everybody,
I made some changes to the mentioned plugin.
I gave the window an overhaul. Now the listctrls are the windows that grow, the helptext below stays put. I put scrolled windows instead of of grid sizers, so there is a sash to resize as one prefers. I change the background color of the help texts to to make them less important.
I added a functionality to the call graph list: activating an item by double click now jumps to that function in the call graph and selects it.
Did some changes in the wxProgressDialog. The dialog took much longer to update, than time needed top parse the underlying data, so I changed the update interval to a fixed setting. Every 1/30 of the underlying data parsed -> on update on the dialog by an according step. It now works very much faster. And I quit the dialog for the gprof call. Just wasn't necessary.
Did some code refactoring too, passing arguments as const& and things like that. I don't know if these changes make the code clearer or faster, but I like it better ... :mrgreen:
Fell free to use the attached diff file and please give me your comments on the changes, in the end I'm still a learning beginner and very fond of critics ... :wink:
Regards
nausea
[attachment deleted by admin]
oBFusCATed:
Not tested, the patch... but will do it some day...
The biggest problem of the profiler dialog for me is that it is modal, it stays on top of C::B and you can't click anywhere.
Can you make it modeless (I think I didn't see it in the changes description) as you are on this topic?
frithjofh:
Hi,
actually I'm not on this topic, really ... I'm a very casual programmer and things like this patch are rather born out of interest in learning something. So I get a peace of code small enough, so it doesn't scare me right away and that I think I can still handle it and understand it, and look into it. Motivation is always that it is a peace of code which I actually use when I do some programming and so I think about it, and about the things that would be nice and if I could change the code to achieve it ... :roll:
I would like to implement some more changes... I think the profiler dialog should be a tab at the bottom of the editor window, so one could directly look into one's code while profiling and jump to the actual functions directly. I will try if I can get this figured out, but I can't promise anything as I have a "normal" work too, and that's not programming :wink: ...
Another thing that would be nice would be some graphical statistic, ... or even a sort of history of profiling a piece of code ... it would be nice too, if working in a target witch is a profiling target that this could change the user interface like hiding the tabs below that are not necessary ... I letting myself being carried away ... but luckily the profiler plugin isn't that important nor urgent, not like code completion anyways ...
First I would want to wait if my changes "pass" and get an OK from the "senior" developers ...
I'll give it a look. Would you just prefer the same dialog, just that it wasn't modal, for a start ? I think I can do that.
Regards
nausea
PS: as I already found a small error in my code, I will be looking into it anyway.
CORRECTION: no error. this was due to memory failure on execution time. That is: MY memory and the advanced hour of night
MortenMacFly:
--- Quote from: nausea on October 08, 2009, 01:05:06 am ---PS: as I already found a small error in my code, I will be looking into it anyway.
--- End quote ---
...which one? So does that mean it is not safe to apply the patch at the moment?
frithjofh:
No, the error I had in mind, is not in the diff file. It was a mistyping in a section with additional parameters for gprof in cbprofilerexec.cpp, I though I had exchanged by error the "-m" parameter but it is all OK apparently. Just woke up and checked it (I'm in Spain time-zone :) ) ...
So it should be safe. At least it is working fine here on my machine, as I can tell. No weird behavior and the parsing result of a gmon.out file I used for testing does not differ from the results parsed from the same file with the svn version.
Regards
nausea
Navigation
[0] Message Index
[#] Next page
Go to full version