Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>First of all, for a windows application it is expected that wndproc will be the most called and time consuming method. It is the heart of an application that handles everything. When you hover over a control with the mouse, it's wndproc handler will be called for almost every pixel the mouse crosses, which is quite allot!</p> <p>That said, the handling of these events should be efficiently written. Larger operations should be delayed by having a small shifting timeout after the last message before the actual operation starts. Retrieving the source of the messages is quite a difficult task since the sender of the messages cannot easily be retrieved (usually it is the OS, unless you call BeginInvoke excessively).</p> <p>One handy tool that might give a hint is <a href="http://www.lovettsoftware.com/LovettSoftware/post/2012/09/07/Software-Trails.aspx" rel="nofollow">SoftwareTrails</a>. It provides a heat-map of recently used classes. Dock it to one side of the screen while clicking around in your app. You will probably see most activity in the System and Microsoft Namespaces, and less in your own. If not, check if you are handling MouseHover events or something.</p> <p>It is totally normal for wndproc to be the most called routine in a windows app.</p> <p>EDIT after reading the comments:</p> <p>Looks like you are calling <code>Invoke</code> or <code>BeginInvoke</code> quite allot, so look those methods up in your profiler and use the call-graph to see what's calling them. Not sure if DotTrace has a full callgraph though, it does have a call tree, but you will need a graph in order to see all the callers with thefrequencys they call your function. There are many profilers out there that include a call-graph.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload