Profiling Debug vs. Release builds

Memory profiling for .NET developers

Moderators: StephenC, Alex.Davies, AndrewH, melvyn.harbour

Profiling Debug vs. Release builds

Postby flipdoubt » Tue Aug 11, 2009 3:34 pm

Does profiling a Debug vs. Release build affect memory profiling results?
flipdoubt
 
Posts: 10
Joined: Tue Aug 11, 2009 3:32 pm

Postby AndrewH » Wed Aug 12, 2009 11:40 am

The answer is 'it depends', but in general the differences will be minor enough not to be significant.

It's possible a debug build will use extra debugging code which will allocate more objects, but usually this will be an insignificant amount of extra objects.

It's also possible that optimisations in the code will mean that some objects can be garbage collected sooner in release builds, but once again in most cases the effect will be insignificant. In debug builds, local variables are kept around for as long as a method is running so they can be inspected by the debugger but in release builds they may be destroyed early.
Andrew Hunter
Software Developer
Red Gate Software Ltd.
AndrewH
 
Posts: 134
Joined: Thu Aug 17, 2006 3:44 pm

Postby flipdoubt » Wed Aug 12, 2009 5:42 pm

Thanks. I am a new user liking this product a lot. About to ask another question ...
flipdoubt
 
Posts: 10
Joined: Tue Aug 11, 2009 3:32 pm


Return to ANTS Memory Profiler Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests