Possible Duplicate:
Any Good Free .NET Profiler?
I am currently developping a control that is supposed to draw a heatmap in realtime at about 20Hz. This consumes an awful lot of CPU resources and I would like to know which function calls are slowing it down that much, sine I got the impression that I am already using a fairly efficient algorithm (only redrawing areas that changed, not instantiating any new GDI related objects unless needed, cleaning up after myself using Dispose(), etc...) So any recommendations concerning a profiler that fulfills said conditions or concerning further optimizations of my algorithm would be welcome.
EDIT: I used the EQATEQ profiler and found out that it made no difference whether I changed Graphics.Clip
. Turns out that one has to declare a new Region
object, modify that, and then call Graphics.Clip = myNewRegionObjet
instead of directly modifying Graphics.Clip
. This is very weird, as typically a reference should be passed, and therefore making changed to the object should be no problem!?
The weird behaviour is described here: http://msdn.microsoft.com/en-us/library/system.drawing.graphics.clip.aspx
I changed my control accordingly, which resulted in a more than tenfold speedup. Now its fast enough. :-)
Has anybody got any idea why the Graphics.Clip
property does exhibit that weird behaviour?