Freigeben über


VS 2008 Performance Improvements

In the VS 2008, we have made some good strides in improving performance for some of the common scenarios that developers care about. We set explicit performance goals both for new product features and for improving the performance of existing features.

For example, with the new LINQ facility we set a goal that LINQ performance be significantly better than using a SqlDataAdaptor for the same query and competitive with using a SqlDataReader, the lightest weight interface available for retrieving data from SQL Server. In our testing, LINQ does in fact out-perform SqlDataAdaptor on almost every test case we tried, and in many of the exceptions, it is no more than 10% slower than using a SqlDataReader to accomplish the same task. Given the power of LINQ, we feel this is a very reasonable trade-off.

Some of the more prominent performance improvements in Visual Studio 2008 that we see include:

· Rebuilding a Visual Basic project and running a background compiler is 3x faster and uses 3x less memory. More about this topic here.

· Scrolling large C# files in the Editor is 100% faster, while typing in new text is 50% faster

· The response time of IntelliSense with large types in C# is up to 10 times faster

· Incremental build time runs up to 90% faster on C++/CLI project solutions. More about this topic here.

·  Office Word and Excel files are processed 20x faster on the server

· TFS Version Control command processing was re-written to support unlimited sized operations on key commands without being memory bound on the server. In our measurements, key Commands also run 10% - 60% faster, with the larger improvements associated with bigger projects. More about the work to improve TFS scalability here and here.

We also focused on performance improvements that exploit multi-core hardware. As I blogged about earlier, we added multi-threaded support to MSBuild. In addition, using the /MP switch, you can significantly improve your C++ project build time – internally we’ve seen improvements of up to 30% when building the C++ Frontend compiler on dual-core hardware. Significant performance improvements were also made in the .NET Framework 3.5 runtime to streamline the CLR thread pool to help multithreaded applications of all kinds. These architectural changes, when combined with socket API changes, improve asynchronous socket I/O throughput up to 70% when a 2nd processor core is available, for example. The full scope of this work is discussed in more detail here.

These are just some highlights. There are many other performance improvements. I am sure there are areas we can do better as well. Like anything else, this is a journey and not a destination.

Namaste!

Comments

  • Anonymous
    September 27, 2007
    PingBack from http://www.artofbam.com/wordpress/?p=3507

  • Anonymous
    September 27, 2007
    It is time for another weekly roundup of news that focuses on .NET, agile and general development related

  • Anonymous
    September 27, 2007
    Thanks for the post! I am interested what other speed improvements you have done to VB, apart from that one for the project file? Does the LINQ facility works the same(have the same speed improvement) if we use C# or VB? Cheers!

  • Anonymous
    September 28, 2007
    Is it planned to have a Release Candidate before the final release of VS2008 and if so do you recommend people who are running live sites on Beta 2 to upgrade to RC or wait till RTM?

  • Anonymous
    September 28, 2007
    Soma just blogged about VS 2008 Performance Improvements . There is some good info in his post. One of

  • Anonymous
    September 28, 2007
    Soma just blogged about VS 2008 Performance Improvements . There is some good info in his post. One of

  • Anonymous
    September 28, 2007
    David Hayden has a post on his blog concerning this: http://davidhayden.com/blog/dave/archive/2007/09/28/LINQToSQLVisualStudio2008PerformanceUpdate.aspx I'd comment on his blog but he has them disabled for some reason. Soma, will this issue be fixed by release?   David (if you read this) can you post the SQL queries generated by those DataLoadOptions in your example?  In theory it should just be 1 query, using JOINS it should bring in all the data in 1 call from all 3 related tables.  Yes there is duplicated data but that is better than "too many" SQL trips IMO.

  • Anonymous
    September 28, 2007
    Can you tell me if you've made improvements to the disaster that is the VC++8.0 SxS deployment system?

  • Anonymous
    September 28, 2007
    The comment has been removed

  • Anonymous
    September 28, 2007
    Hi ajaxus, Thank you for your inquiry.  Yes, there are additional performance improvements included in Visual Basic 2008.  Stepping, first-time intelliSense, errors in the task list, editor responsiveness, large solutions, and web apps are a few examples of areas where we have focused on improving performance.  Cameron McColl, VB perf developer, has created a video on Channel9 where he talks about and demonstrates several of these scenarios: http://channel9.msdn.com/ShowPost.aspx?PostID=328382#328382 As far as how LINQ runs in VB vs C#, there are some common parts...  Both use the same APIs in .Net Fx 3.5, both utilize the same LINQ providers, and both are using the same underlying technology.  However, there are some differences too, such as the different (but similar) expression trees that are produced using the VB and C# compilers.  Both teams have taken performance into account in their designs, however.  So this should not be a reason choose one language or the other.  If you do happen to experience any problems with either, you can email VB Performance (vbperf@microsoft.com) or CSharp Performance (vcsperf@microsoft.com) and we will be happy to look into it. Thanks, Lisa Feigenbaum VB IDE & Perf Program Manager

  • Anonymous
    September 28, 2007
    Hello Larry,  With regard to improvements to the VC++8.0 SxS deployment system, unfortunately there are no changes to the deployment scenario in VC9.0. On the other side, we realize that there is some pain there. We currently have plans to look into that (even if a redesign is needed) and hence would like to hear more about the issues you are facing and your suggestions for improvements. Please feel  free to contact me directly at aymans at microsoft dot com Thanks, Ayman Shoukry Lead Program Manager Visual C++ Team

  • Anonymous
    September 28, 2007

  1.  Pls include x64 compilers in C++ 2008 Express.
  2.  Pls include MFC and ATL in C++ 2008 Express.
  3.  Pls include Class View in VB 2008 Express.
  • Anonymous
    September 29, 2007
    [原文地址] VS 2008 Performance Improvements [原文发表时间] Thursday, September 27, 2007 4:52 PM 在 VS 2008 中 ,我们就开发人员所关心的一些常见的使用场景在性能上作了很大的改进

  • Anonymous
    September 29, 2007
    I'm hoping the "VS takes 2+ minutes to shut down after it's been left open for several days" problem has been solved. :)

  • Anonymous
    September 30, 2007
    Patriot, Have you seen that problem in Visual Studio 2008 Beta 2? If so, can you please log the issue through http://connect.microsoft.com/ with as much detail as you can provide? Include things like the size and type of solution you are building (native, managed, web, device, etc). Thanks! Neil Enns Senior Program Manager Microsoft Visual Studio Platform Team

  • Anonymous
    October 01, 2007
    Responding to the post that requested:

  1.  Pls include x64 compilers in C++ 2008 Express.
  2.  Pls include MFC and ATL in C++ 2008 Express. While both of these are fine requests, we're unable to implement in the Visual C++ 2008 Express time frame.  We will definitely consider these for the next versions. Bill Dunlap Visual C++ Development Team
  • Anonymous
    October 01, 2007
    Responding to the post that requested:
  1.  Pls include Class View in VB 2008 Express. This is a great request and VC# Express does have this feature. For the core (beginner) customer segment that VB Express was aiming for, we decided not to include it in VS 2008. We will consider this for the next version. John VS Express Team
  • Anonymous
    October 02, 2007
    I am overjoyed that performance is being improved in VS 2008!  My past experience had been VS get slower each iteration: VS6, VS2003 and VS2005.  And to me, better performance is really much more important than Cool.New.Features. This really is an interesting post, but... I don't see performance improvements centered on the native C++ story.  What work has been done there? thanks, Jared

  • Anonymous
    October 03, 2007
    Hi I installed VS2008 Beta2 and can no longer find windiff.  Im wondering if this is because there's some forthcoming diff'ing experince integrated into the ide. If not why was it removed and will you please bring it back prior to rtm? thanks -john

  • Anonymous
    October 03, 2007
    You can now find WinDiff.exe in the "C:Program FilesMicrosoft SDKsWindowsv6.0ABin" folder in all VS2008 installs after Beta 1 including RTM.

  • Anonymous
    October 10, 2007
    A couple of weeks a go I blogged about the performance improvements in Visual Studio 2008. In response

  • Anonymous
    October 10, 2007
    Somasegar's WebLog has a entry on VC++ Performance Improvements in VS 2008 . A couple of days ago he

  • Anonymous
    October 10, 2007
    Somasegar, jefe en Microsoft Corp. de muchos de los avances de la plataforma .NET, ha realizado unos

  • Anonymous
    October 10, 2007
    [原文地址]: VC++ Performance Improvements in VS 2008 [原文发表时间]: Wednesday, October 10, 2007 5:59 PM 几个星期前

  • Anonymous
    October 10, 2007
    A couple of weeks a go I blogged about the performance improvements in Visual Studio 2008. In response

  • Anonymous
    October 22, 2007
    How is 100% faster?  Does it really take less than 1/200th of the time of visual studio 2005 and you rounded?

  • Anonymous
    October 23, 2007
    Brad, When we say "Scrolling large C# files in the Editor is 100% faster" we mean that you can scroll 100% more lines in the same amount of time (or twice as fast). Sorry for the confusion. Dave Berg Developer Division, Performance Engineering

  • Anonymous
    October 31, 2007
    I'm currently trying to pro-actively drive the adoption of the .NET Framework 3.5 and VS 2008 within

  • Anonymous
    November 14, 2007
    Forget about performance, or functionality improvements, can VB.NET compile a non-trival web project without crashing in debug mode!! Can it detect basic compile problems at compile time, or just barf at runtime like vs 2005.. Will it work with multi-core cpu's without going to sleep? Having been burnt before when is  2008 SP1 due out?

  • Anonymous
    November 26, 2007
    If you have not heard yet, VS2008 was just Released to Manufacturing !  If you have an MSDN subscription,

  • Anonymous
    November 26, 2007
    [原文地址]VS2008PerformanceImprovements [原文发表时间]Thursday,September27,20074:52PM 在VS2008中...

  • Anonymous
    November 30, 2007
    Where can i find a list of changes between the 2005 and 2008 versions of C++. Also there was a bug in 2005 that it could get confused about the number of copies of static variables in templatized functions when optimizing. Was this fixed?

  • Anonymous
    December 12, 2007
    Beside impressive performance improovements you have written about, you fogot to mention in your post about 10x performance decrease in Windows Forms designer 10x performance decrease in Web Forms designer Random stalls during: especially between compilation end and displaying results. Those problems occur on 8 core Xeon 1.6, with 8 GB ram and RAID 10 7200 RPM configuration on Windows 2003 x64.

  • Anonymous
    December 12, 2007
    Marcin Kosieradzki, Could you please e-mail me at DevPerf@Microsoft.com with some more details about the performance problems you're seeing?  I'd like to understand the situation better so that we can make sure it gets addressed.   Thanks! David Berg Microsoft, Developer Division Performance Engineering Team

  • Anonymous
    December 12, 2007
    Thanks for response! Of course, I will try to reproduce and describe those issues and send them soon.

  • Anonymous
    January 08, 2008
    VS2008  really rocks. It has so many imporvements that it just totally changed my way of working while developing ASP.NET websites. I´m in love with the better support of css at design time and (of course) the better perfomance is sooo sweet!

  • Anonymous
    January 09, 2008
    I guess the VS 2008 team decided to improve on the 2005 terrible memory consumption habits too.  The IDE is practically unusable once it starts to eat up all of your memory.  So all of these great improvements you are talking about becomes meaningless :)

  • Anonymous
    January 10, 2008
    Alan, I'm very interested in getting a repro case for the memory problems you're seeing.  Can you either e-mail me more details (DevPerf@Microsoft.com) or file a connect bug? Thanks, David Berg Microsoft Developer Division Performance Engineering Team

  • Anonymous
    January 30, 2008
    The comment has been removed

  • Anonymous
    January 30, 2008
    Sorry for the harsh comment there; two kind engineers from Microsoft have just offered their assistance to help me track down the speed/performance issues with my install of VS2008.

  • Anonymous
    February 10, 2008
    The comment has been removed

  • Anonymous
    February 11, 2008
    Ryk, I'm sorry VS 2008 isn't living up to your expectations.  I'd appreciate it if you'd be willing to help me understand the issues you're facing, and the history behind them, both to resolve the current problem and help prevent future issues. You can reach me at DevPerf@Microsoft.Com. Thanks! David Berg Microsoft Developer Division Performance Engineering Team

  • Anonymous
    February 13, 2008
    The comment has been removed

  • Anonymous
    February 14, 2008
    Michael, I've been working with Will and Ryk on their issues (and I think we've got Will's resolved).  Can you please contact me at DevPerf@Microsoft.com so I can understand your issues a little better and we can see if we can get them resolved? Thanks! David Berg Microsoft Developer Division Performance Engineering Team

  • Anonymous
    March 21, 2008
    Hi, I'm concerned about the performance issues that I'm facing before and after the installation of the hotfix 946581. My system is running with 2GB of RAM over Vista Ultimate with all the updates. I have installed VSS + update, VS 2008 TS + hotfix, SQL 2005 + SP2. At the moment, using the system with a simple web project (20 pages with ajax + 3.5). I would like to mention this issue comes from previous installation under XP SP2 and XP 64, and the problem is the same. The time and the resources VS 2008 takes to render (if possible, because most of the times I feel so frustrated that the system takes 800 MB of ram and growing that I close the process) the page in design view, or changing from design-View to design-source. The page that break the system has multiview and 10 views, is THAT to much for VS 2008? Let me know and I will split my page, please!!!

  • Anonymous
    March 24, 2008
    AleV, We're sorry to hear about the performance issues you're facing.  Can you please contact me at DevPerf@Microsoft.Com?  I'd like to know more about your issues and see what we can do to resolve them. Best Regards, David Berg Microsoft Developer Division Performance Engineering Team

  • Anonymous
    April 14, 2008
    The VS 2008 is amazing but i too agree that the interface is slow. Especially when you are designing an aspx page in split mode. It takes some time to refresh the page after modifying or adding a control. Also the RAM usage goes up all the way and the overall system gets slow. I have 1 GB ram on my machine with a 2.3 GHz processor. Do i need an upgrade to 2GB, will it help. Could some body please let me know. Thanx

  • Anonymous
    April 15, 2008
    The comment has been removed

  • Anonymous
    April 16, 2008
    The comment has been removed

  • Anonymous
    April 16, 2008
    PS. I'm running 2GB of RAM on a 1.6Ghz processor.  Unfortunately I'm also running vista...

  • Anonymous
    April 16, 2008
    The comment has been removed

  • Anonymous
    April 22, 2008
    The comment has been removed

  • Anonymous
    April 22, 2008
    Robert, We're very interested in understanding your problem.  Can you please contact me at DevPerf@Microsoft.com so that we can take a closer look? Thanks, David Berg Performance Engineering Team

  • Anonymous
    April 23, 2008
    The comment has been removed

  • Anonymous
    April 25, 2008
    The comment has been removed

  • Anonymous
    June 17, 2008
    I am attempting to use Crystal Reports Basic in Visual Studio 2008 w/SP1 Beta.  Performance is terrible.  It is extremely slow in loading, and anytime I work with a text field it take 1 to 2 minutes just to be able to edit the content.  The opening of the report in the IDE is also extremely slow.

  • Anonymous
    June 17, 2008
    The comment has been removed

  • Anonymous
    June 19, 2008
    The comment has been removed

  • Anonymous
    June 19, 2008
    What is the equivalent technics of ATL in VS 2008 ? How to implement ATL in VS 2008 ?

  • Anonymous
    October 14, 2008
    I wonder what can be a source of VS2008 slowness? VS2008 used to be fast and sleek on my machine. I can't remember what happened, I think it's when I changed job and had to install ReSharper (which I latter removed, good riddance) Anyway, I think since this ReSharper event, I think VS is slower. And there is at least 1 feature where its painfully obvious beyound doubt: implement interface / abstract class. If I create a new C# Console application", create a new class "Class1", mark it as "IDisposable", VS will offer to implement the interface for me (ALT+SHIFT+F10 when the cursor is on "IDisposable"). IF I use VS interface member auto generation in this empty project for the small and common IDisposable interface, I will have to wait for about 10 second!!!! Any clue on what can I do? Also I did uninstall ReSharper (which I believe is the troublemaker) yet it's still horrendous, where could I look for left over files?

  • Anonymous
    October 14, 2008
    The comment has been removed

  • Anonymous
    October 20, 2008
    devenv.exe /SafeMode it's snappy again but without any plugins! I finally solved it anyway. I deleted all the Visual Studio registry keys, reinstalled, and it's snappy again!

  • Anonymous
    October 28, 2008
    Don't believe all the hype about performance.  I just purchased VS2008 because of what I was reading about the performance improvements.  I just couldn’t take the poor performance of VS20005 any longer.  Wow was that a mistake!  VS2008 is extremely slow (the ide) ... you have to wait at least 3 - 5 seconds after each keystroke.  The performance is awful!  I see no improvement over VS2005 whatsoever.  I can’t believe that Microsoft cannot offer me (since vb6) an IDE that can perform as quickly as I think and type.  Waiting for the IDE to catch up with me is frustrating enough but add poor compile times and you have an extremely slow environment that doesn’t improve the poor performance one bit over VS2005.  Pentium 2.4 w/ 1gb ram.  

  • Anonymous
    October 28, 2008
    Bob, I'm sorry VS2008 isn't performing the way you'd like.  I'd like to understand more about the performance problems you're encountering and your system setup.  Also, please make sure you have the VS2008 SP1 update installed. Can you contact me at DevPerf@Microsoft.com? Thanks, David Berg Microsoft Developer Division Performance Engineering Team

  • Anonymous
    October 30, 2008
    The comment has been removed

  • Anonymous
    October 30, 2008
    Bob, Sorry you're running into such major performance problems.  Yes, lots of people are using VS2008 and happy about the performance (including for very large projects). Your machine sounds fine (we did most of our performance testing of VS2008 on 1 and 2GB machines), although there's a lot more to good performance than just memory and CPU speed. I'd like to know more about your environment and the problems you're running into.  You can reach me at devperf@microsoft.com.   Thanks, Dave Berg Microsoft Developer Division, Performance Engineering Team

  • Anonymous
    October 30, 2008
    Lloyd Dupont, I'm really glad to hear you resolved your performance issues.  I'd appreciate any additional insights you have into what was wrong so we can try to make sure others don't run into problems. You can reach me at devperf@microsoft.com.   Thanks, Dave Berg Microsoft Developer Division, Performance Engineering Team

  • Anonymous
    November 07, 2008
    The comment has been removed

  • Anonymous
    November 12, 2008
    Bob, We're glad it worked out for you.   There's no adverse affect to turning off XML Docs, but it means that Intellisense will no longer show xml doc info in the tooltips for the related methods/types. Also, it turns out that there is a hotfix available for the problem, you can read about it here: http://support.microsoft.com/kb/946344 Regards, Dave Berg - Performance Engineering Team

  • Anonymous
    November 19, 2008
    I have just upgraded from Visual Studio 2003 to 2008, and have installed Service pack 1.  The application I work on is a console application that calls several dlls, all written in native C++.  My initial testing shows that the code built by 2008 is 3 times slower than 2003.  I am open to any ideas to regain that performance loss. Steve

  • Anonymous
    November 19, 2008
    Steve, When upgrading VC++ projects to VS2008 sometimes the optimization settings get turned off.   In the property pages for your project, under Configuration Properties -> C/C++ -> Optimization, make sure you have the settings you expect.  (Optimization != Disabled) Also, under  Configuration Properties -> Linker -> Optimization, check References = Eliminate Unreferenced Data and Enable CoMDAT Folding = Remove Redundant COMDATs. If that doesn't help, then please e-mail me at devperf@Microsoft.com with more information. Regards, David Berg - Performance Engineering Team

  • Anonymous
    November 27, 2008
    Can you make a list of all the options / settings that would speed up VB.NET / ASP.NET coding? Print screens are even more welcomed...

  • Anonymous
    December 11, 2008
    i'm using a Intel Core 2 Quad @2.40 and 3GB ram, how come it seems that Visual studio can only use two of the four cores? I've found that it will max out two core and not touch the other two! meaning VS 2008 just hangs for a minute or so before catching up with itself.

  • Anonymous
    December 12, 2008
    Matt, Can you let me know a little bit more about what you're trying to accomplish?  I'd like to understand where you're bottlenecks are at.  You can e-mail me at DevPerf@Microsoft.com. Regards, David Berg - Performance Engineering Team

  • Anonymous
    December 16, 2008
    I'm glad David has jumped on this thread too.  For what it's worth, it's not too surprising to find VS to be using less than the full number processors.  This is actually quite a challenge for modern applications which often have only one UI thread.   While VS can and does use more than one thread or even more than one process in a variety of cases there are many cases in which just one thread can do the work.  That's something we'd like to change. Unlike clock rate increases, adding more processors doesn't result in automatic extra performance due to parallelism.  That too is something we'd like to change but that is an even deeper discussion about having (more) programming models that scale (more often) to the available processing power. Sadly, in our current code base, there's nothing automatic about any of this.

  • Anonymous
    January 14, 2009
    My VS2008 SP1 is crashing when I detach debugger when debugging classic ASP. Is there a hotfix or solution available to work around this problem? This problem is described in detail here (http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/2666a8e4-e7dc-4e9f-83df-955aca67bf55/)

  • Anonymous
    April 29, 2009
    The comment has been removed

  • Anonymous
    April 29, 2009
    Felluh, Can you provide more details about your specific problems / issues?  The blog you referenced has a number of issues, some of which are resolved and some of which aren't, but it's not clear which of those are your issues. Regards, David Berg Performance Engineering

  • Anonymous
    September 10, 2009
    The comment has been removed

  • Anonymous
    September 16, 2009
    @John Younie can you contact me at amy.dullard@microsoft.com so I can get more info from you? (Code vs. Design view, page content, etc) Thanks!

  • Anonymous
    May 27, 2010
    David Berg, my highest appreciation for offering your help despite Felluh's offensive tone. In my case, what that improved build performance the most was to use a fast, dedicated disk for compiling, to adjust virusscan policy for devenv.exe, to define the same outputfolder for every project and then to set CopyLocal to false on project references. Some additional resources: stackoverflow.com/.../visual-studio-optimizations weblogs.asp.net/.../tip-trick-hard-drive-speed-and-visual-studio-performance.aspx arnosoftwaredev.blogspot.com/.../how-to-improve-visual-studio-compile.html blog.brianhartsock.com/.../analyzing-visual-studio-build-performance