An MDA related deficiency in the Microsoft Visual Studio (2005 and later versions) causes any API intensive application to run slow within the development environment. The speed of the DK.NET + Visual Studio compiled application running outside of the Visual Studio development environment is normal. Therefore, perform any DK.NET performance testing outside of the Visual Studio development environment.
For more on this issue, refer to the information at the following links:
http://blogs.msdn.com/jmstall/archive/2006/01/17/pinvoke_100x_slower.aspx
GDI+ uses the API via Interop and MDA reports this, slowing down the process dramatically. It is annoying because .NET is very GDI intensive. Read more about Managed Debugging Assistants at: http://msdn2.microsoft.com/en-us/library/d21c150d.aspx
This material contains instructions how to disable MDA. A simple, but somewhat aggressive, way to disable MDA is to tweak the registry:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]
"MDA"="0"
The MDA setting can be restored by:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]
"MDA"="1"
However, in order to debug processor intensive applications in Visual Studio (2005 and later versions), it is probably necessary to also disable the Visual Studio hosting process. This option can be found on the Debug tab of the project properties.
Furthermore, debugging a semi-transparent layer can be particularly slow. We suggest turning off any layer transparency upon debug time.