This is a migrated thread and some comments may be shown as answers.

Fix for slow performance under debugger

1 Answer 578 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Xetick
Top achievements
Rank 1
Xetick asked on 26 Apr 2007, 08:26 AM
The grid view can be very slow if you run it under the debugger in visual studio. After some digging I have found a fix for this problem. This problem is probably not just releated to the gridview but to the whole telerik framework.

The reason is that by default visual studio enabled extra checks in among other things the pinvoke. It's used when the CLR goes from managed to native code. This apparently happens in simple things like "Bitmap.Width". The penelty for these check is a slowdown of up to 100x. So we of course want to turn them off.

One way to do taht is to add a file called "<programname>.exe.mda.config" next to your exe.
In that file copy the following
<?xml version="1.0" encoding="UTF-8" ?>
<mdaConfig>
  <assistants>
    <pInvokeStackImbalance enable="false"/>
  </assistants>
</mdaConfig>

Lastly disable 'visual studio hosting" under the debug properties. Now your  app should run as quickly as using Ctrl+F5.

For more reading about this issue:
http://blogs.msdn.com/jmstall/archive/2006/10/23/debugger_5F00_slowdown.aspx
http://blogs.msdn.com/tlai/archive/2006/06/15/How-to-Disable-a-Specific-MDA.aspx
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=114648
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=106327
http://msdn2.microsoft.com/en-us/library/d21c150d(en-US,VS.80).aspx

Cheers
 Joakim E.

1 Answer, 1 is accepted

Sort by
0
Xetick
Top achievements
Rank 1
answered on 27 Apr 2007, 07:56 PM
Seems like you also enable the MDA to get this to work.
Create a file called "MADEnable.reg" and copy in the following

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]
"MDA"="1"

Then run it.

Tags
GridView
Asked by
Xetick
Top achievements
Rank 1
Answers by
Xetick
Top achievements
Rank 1
Share this question
or