I’ve been testing out upgrading some VS 2008 applications to 2010, but hit some MAJOR issues with projects that use Microsoft Reporting. I had reports that usually took seconds now take over a minute; and navigating via the document map was painfully slow as well: over 10 seconds compared to less than a second in the old version. I looked and looked and couldn’t find the cause. Strangely enough using the old report viewer worked well enough at runtime but had no design time support in VS 2010.
Then I stumbled across a post in Brian Hartman’s blog about changes to CAS in 4.0 and the effect on the report viewer. I didn’t think that could account for such a huge performance difference, but as I didn’t have anything else left to go on, I thought I’d try running the app using the new viewer compiled against .NET 3.5. As soon as I did that it worked just like it use to: the performance issues had disappeared. That meant it wasn’t the new viewer that was causing the issues as such, it was CAS.
So the next thing I did was compile the project against .NET 4.0 and sure enough the performance problem was back. I then opened up the config file and added the NetFx40_LegacySecurityPolicy element:
<runtime>
<NetFx40_LegacySecurityPolicy enabled="true"/>
</runtime
Now it all works nicely; performance problems fixed.
So if you have troubles with local reports when upgrading to .NET 4.0, then trying adding the NetFx40_LegacySecurityPolicy element to your app.config.
If you are looking to improve the performance of your PC, Solid State Drives (SSD’s), although still costly provide fantastic performance gains for the price. Last month I put in a Corsair V128GB2 and the performance difference on my aging Quad Core Q6600 system is HUGE !!
Most notable are the gains in boot time and application loading times. VM’s also seem less sluggish. It’s also silent and low power usage and low heat dissipation. (carbon credits there ?)
The overall gain in performance I would liken to the experience we use to get upgrading to a new processor after a year or two.
Definitely a great investment. And the good thing is you can take the SSD with you to your next system (which is my plan once I’ve sorted out that LGA 1366 stuff)
Anyway, if you are looking at sprucing up your system, or making a nice clean one for Visual Studio 2010 (now released on MSDN) and the soon to be released Office 2010 (mmm… 64 bit Excel and Access !!), go for a SDD.