When I profile code, I use 2 different methods, according to the suspected leak :
for some I just run my code in debugger, and profile by attaching the profiler to the process,
this has the advantage, that I can actually trace into the code , and make some changes to it , without actually restarting the application , by using the VS2005 debugger, and still get the profiling information .
for others I actually start the VS plugin for the profiler ... this has as advantage that the GC happens automatic, and ("i thought"), the restarting of the application happens faster ("no attach process") ...
I just detected that the plugin does not rebuild the code before starting it,
so if you change some code , and want to detect how this infects the memory usage, you still have to do a manual rebuild FIRST, and then start the profiling ....
This does seem logical now, but I have been using the profiler on and off for 2 months now, and only now detected this.
Any tips on how to improve the speed between 2 profiling sessions,
with changed code ?
If you need to debug the application while profiling, you can either start the normal debugger and attach the profiler (as you describe), or you can start the profiler and then attach the debugger. The latter option is the one that I would recommend, since you get more information when the process is started by the profiler (in future versions we will make it easier to debug a profiled process in Visual Studio).
It should not take longer time to perform two profiling sessions, with code changes in between, compared to two similar debugging sessions (unless you make use of Edit and Continue). Are you experiencing that it takes longer than that?
SciTech Software AB
adding a message then reprofiling did proof that the code was up to date ...
just had the perception that the building was skipping some steps in the output window
I was perceiving that 2 profiling sessions took much less time then 2 debug sessions, thats why i thought it did not rebuild all projects
Users browsing this forum: No registered users and 25 guests