Welcome to MSDN Blogs Sign in | Join | Help

Performance Improvements in Visual C++

Hi, my name is Jim Springfield, and I’m an architect on the Visual C++ team.  I recently spent two months working on some core improvements to how VC deals with Intellisense as well as overall UI responsiveness.

We observed a strong correlation between the severity of these performance issues and the size of the projects and solutions exhibiting these problems.  As a result, we worked closely with some large ISV customers who were reporting problems with our IDE.  These customers typically had solutions with over a hundred projects comprising thousands of files.  While I can’t identify them by full name, I want to give a shout out to them and thank them for their time and effort.  So, thank you to Bob, Don, Dick, Rainer, Kelly, and Mike, you know who you are.

While I was working on these changes as a Quick Fix Engineering patch (or, “QFE”) for Visual Studio 2005, I was also tracking the changes for Visual Studio 2008 “Orcas,” and I am happy to report that all of these changes will be available in VS2008 as well as available in a publicly available QFE (also called a General Distribution Release, or “GDR”) for VS2005.

The GDR can be downloaded from the link below.  You will be prompted to login with a Windows Live ID or Passport first and then taken to the actual download location. http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=9436

I wish I could say everything in these areas is fixed as a part of our efforts.  However, the reality is that there were some issues that needed more substantial work and which was impossible to accomplish in this time frame.  We are already working on the next release beyond VS2008 and addressing these issues will be one of our top priorities.  We are fundamentally changing how we approach Intellisense and we are designing with the largest solutions in mind.  We will be blogging about the direction this work is going, so watch this space for additional information on these efforts as the work we are doing here is quite interesting.

To give you a feel for the scope of the changes we made to address these issues in VS2005 and VS2008, this work touched 46 source files across three DLL’s.  Overall, 4664 lines of code were changed or added.  I would like to take this opportunity to give you a bit of insight into the nature of problems we identified and the solutions we implemented.

Different lock implementation for accessing the NCB (Intellisense)

The .NCB file (an in-memory Intellisense data) was protected with a simple critical section to prevent simultaneous access from multiple threads.  However, often there were multiple threads that just wanted to read information the NCB, not modify it, so we replaced the NCB critical section with a multi-reader/single-writer lock.  This allows multiple threads to read the NCB at one time which can happen when an Intellisense request is happening on the background thread and the foreground thread needs to access it as well.  A classic example of this problem was getting a QuickInfo tooltip.  The foreground thread would need to do some basic querying of the NCB to create the QuickInfo request, which would then be processed on the background thread.  However, if the background thread already had the lock, then the foreground would block until the background was done.  This was really noticeable when scrolling around a large function.  Similar problems happened with AutoComplete requests as well.

Reduced the number of “throw-away” requests

When quickly navigating around a file, we would generate QuickInfo and CodeDefintionWindow (if the window was open) requests as the cursor touched different areas of the code.  This could result in a bunch of background requests that would run and then be ignored.  We made a change to only allow one of these types of items in the queue at a time.

Improved speed when changing active configuration and other options

There were a few things that were incredibly slow to change in a solution.  Modifying certain options (such as adding an include directory) or changing the active configuration would take a really long time for large solutions.  There was some really inefficient work going on in these cases which has been removed or redone.

Goto Definition improvements

“Goto Definition” in many situations will parse the file to the cursor in order to know the exact type of the identifier under the cursor.  This was happening on the foreground thread and if there was a low-priority item on the background thread running, the foreground would have to wait for the background one to finish.  This was changed to queue the item to the background queue, which causes any low-priority items to be aborted. As a result of this work, we had one customer reporting a two minute delay drop to 10-20 seconds.

Reduced CPU consumption

There is now throttling of the background thread when doing most of the parsing.  Even though the background was running at lower priority, there was concern about it using 100% of the CPU and some reported issues of it interfering with other applications.  We now process low-priority background items (such as Intellisense population) using only ~80% of a CPU’s time.  Any high-priority items (i.e. Intellisense requests) will still be processed during this time.

File lookup in projects

We changed the project system to make looking up files in projects much more efficient.  This improves several scenarios such as adding files to projects, changing configurations, etc.

More information in status bar

There is now more information displayed in the status bar.  It looks like this:  “Updating Intellisense… (xxx)”.   The number in parentheses shows how many background thread work items are in progress.  For customers that aren’t seeing Intellisense ever complete, this information may be useful.

Wait cursor

We now display the wait cursor at times when the IDE may not be able to respond immediately.  This gives better feedback to people that the IDE isn’t just hung, and may be displayed in the following situations:

·         Closing a project

·          “Goto Definition” is invoked or when a foreground parse is required

·         After loading a solution and doing initialization

·         Reparsing a solution after a configuration change

Improved idle-time processing

We made a variety of improvements to how the IDE handles its idle-time processing.  This work involved changes to ensure that lower priority idle tasks are treated as such by the IDE, enabling longer-running idle tasks to be spread out over multiple idle cycles, and ensuring our idle logic is smart enough to break early for later completion when a higher priority task is waiting.  Overall, these changes make the whole UI/editing experience smoother.

Map of files added to project

Looking up files in a project was doing just a linear search of the files.  This caused big slowdowns when doing certain operations such as adding a file to a project that already contained lots of files.

Miscellaneous performance and correctness improvements

·         We identified a few internal algorithms that exhibited poor performance (i.e. O(N^2) or O(N^3)) at large scale and replaced these with algorithms that scale more linearly.

·         We found instances of function-static data being used in multi-threaded scenarios and made these thread safe by moving this data to Thread Local Storage.

·         We improved performance of an internal hash table with a better-performing hashing function that exhibits fewer collisions.

Exposed a mechanism to control some aspects of Intellisense

Some customers have learned to manually disable Intellisense by marking the NCB file as read-only or deleting the Intellisense engine, feacp.dll, from the vcpackages directory, but there has not been a way to control any of this from the IDE.  While working on this QFE, I added a few flags that can be set using VS macros that do things such as disabling Intellisense almost completely or disallowing updates to the NCB while allowing queries.  The second mode is pretty useful for large projects where Intellisense works and is useful but reparsing is painful.  You can now disable updates until you have finished a bunch of edits and then turn it on and get everything parsed up-to-date.  The macros that control these settings can be attached to toolbar buttons for convenient access while coding.  Given how long this entry already is, I will write a separate blog on this soon.

 

PS: Jim wrote the subsequent macros blog and here it is: http://blogs.msdn.com/vcblog/archive/2007/11/19/controlling-intellisense-through-macros.aspx

 

Thanks

Damien

Published Monday, November 12, 2007 10:57 AM by vcblog

Comments

# MSDN Blog Postings » Performance Improvements in Visual C++

Monday, November 12, 2007 4:54 PM by JudahGabriel

# re: Performance Improvements in Visual C++

Some of the things you mention, changing configurations for example, are applicable to other languages besides C++. Should this patch be applied if we're working in C# or VB.NET?

Monday, November 12, 2007 4:59 PM by Carole

# re: Performance Improvements in Visual C++

Great! Appreciate your efforts!

This comment is off-topic for this post. However, if anyone in VC++ team reads my comment, I'd like to hear your opinions.

Having been using VC++ around 10 years, I believe VC++ offers the best IDE on Windows. However, the bad thing is when I need to develop on Linux environment, it's just painful with vi/emacs and gdb. I can do it with these tool chains, but it's just matter of efficiency.

So, I was always dreaming that VC++ could select different tool chain sets such as CYGWIN to emulate Linux development. For example, VC++ could be GUI front-end for gdb.

I'm wondering that VC++ team did consider such cross platform issues. It would be great that if VC++ is more general IDE for C/C++ development, not just for Windows tool chains.

This is because of Eclipse. I don't think that Eclipse CDT is superior to VC++, primarily because of its nightmare performance due to Java. Some features in Eclipse are good, but, for example, VC++'s debugging features are far better than Eclipse's one.

However, Eclipse can be used across the platforms and various languages, also offers very nice extensibility. So, it would be nice to look around what Eclipse are trying to do.

Monday, November 12, 2007 7:01 PM by Thomas

# re: Performance Improvements in Visual C++

We also have thousands of files in hundreds of projects in our sln.  One of our biggest issues with the IDE is the amount of time between when link.exe/mt.exe finish and the ide actually says the build is complete.  For our largest app, it takes up to 5 minutes.  Is this addressed?

Monday, November 12, 2007 7:46 PM by Sam

# re: Performance Improvements in Visual C++

that's great work, but I can't manage to install this fix. It says the package is invalid.

Monday, November 12, 2007 11:27 PM by vcblog

# re: Performance Improvements in Visual C++

Hello

Re: Monday, November 12, 2007 7:46 PM by Sam

> that's great work, but I can't manage to install this fix. It says the package is invalid.

Can you give us your exact configuration (OS/VS/Versions/etc) and the exact error message please?

Thanks

Damien

Tuesday, November 13, 2007 1:04 AM by DotNetKicks.com

# Performance Improvements in Visual C

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Tuesday, November 13, 2007 1:12 AM by tfd@dubna.ru

# re: Performance Improvements in Visual C++

Performance Improvements in Visual C++

Tuesday, November 13, 2007 2:34 AM by Norman Diamond

# re: Performance Improvements in Visual C++

The filename is 330130_ENU_i386_zip.exe

Is that filename accurate?  If so, where is the Japanese version?

Re "I was always dreaming that VC++ could select different tool chain sets"

It does exactly that when targeting Windows Mobile (Windows CE).  I wonder if there's any documentation on how to do it.  I wonder if Intellisense and "go to definition" will really work after this hotfix, when targeting Windows Mobile.

Tuesday, November 13, 2007 2:54 AM by stevetei

# re: Performance Improvements in Visual C++

JudahGabriel: This QFE will only affect C++ projects; I'm afriad it won't help your C#/VB projects (perhaps we can entice you to do more C++ coding <g>).

Carole: We've discussed this internally, but we don't have any plans on the near-term horizon for full fidelity support of alternative build tool chains (short of a user doing it themselves by writing their own VS project system).  However, in the VS10 timeframe, we are looking at ways that we can make the IDE more useful in situations where you may have only source code without VS project/solution files.  Nothing specific to report yet, but we're thinking about what we can do here.

Thomas: I'm not sure of the cause of the build/link performance issue you're seeing, so it's hard to say whether the QFE will fix it, but please do give the QFE a try and let us know what you see!

Thanks!

Steve Teixeira, Group Program Manager, VC++

Tuesday, November 13, 2007 7:52 AM by .NET o no .NET, esa es la cuestión

# Disponible un QFE (parche) para Visual Studio 2005SP1 y C++

Acaban de publicarlo en el blog del Team de Visual C++: Intenta solucionar los enormes problemas que

Tuesday, November 13, 2007 8:20 AM by hurzler

# re: Performance Improvements in Visual C++

Thanks for your efforts! A few issues though:

The QFE installer leaves two processes after finishing: MSI installer and .NET Runtime Optimization Service.

How do you access the macros controlling Intellisense behavior?

I'd hoped the status bar clutter would disappear. Instead, there's even more info (well, not much). This seems like debug output to me. As an end user, I'm not interested in the status of internal processes. Intellisense status keeps overwriting other status info, which is more valuable to me, most particular build error messages which are copied to the status bar on double-clicking them in auto-hide build output.

Is there any chance of getting rid of that? One of those macros maybe?

Thanks & regards,

Hurzler.

Tuesday, November 13, 2007 11:38 AM by Jim Springfield

# re: Performance Improvements in Visual C++

A couple of notes based on some of the comments I've read.

1) This is for C++ only.  It won't have any impact on C# or VB.

2) If you have installed the XBOX SDK, this update will not work for you as they replace the C++ project system.  They may release a patch that includes these changes.

3) There is no separate Japanese install.  These binaries are MUI and should work fine.

4) I appreciate your comment about the status bar clutter.  However, for people with very large solutions, seeing the count of the number of files drop is comforting when they can't see the progress bar move.  A UI option to control this would be nice, but it isn't in there now.

5) I should get the entry on how to do the macros up in the next couple of days.

Tuesday, November 13, 2007 12:25 PM by Matt

# re: Performance Improvements in Visual C++

Some of us have disabled intellisense by renaming or deleting feacp.dll - will the installer run correctly if feacp.dll does not exist? Does this QFE include a new version of feacp.dll?

Ok, I installed the QFE with feacp.dll renamed as feacp.dll.bak, and I did not get a new feacp.dll. Is it safe to assume the intellisense engine has not changed? (maybe the installer should drop this file if it does not exist, since a previous workaround was to rename/delete it?)

Tuesday, November 13, 2007 12:29 PM by Bob

# Performance improvements in executable code?

Please cover any speed improvements in compiled code.  Even a small improvement (~10%) would greatly help our image processing executables.

Tuesday, November 13, 2007 5:12 PM by Todd Greer

# Is SP1 required?

Can this be installed on Visual Studio 2005 as shipped (without SP1)? (We haven't gone to SP1 yet due to problems with manifests causing builds to be Vista-only.)

Though our solutions have something less than 20 projects, the Intellisense problems are quite annoying; it's great to see a fix

Tuesday, November 13, 2007 7:18 PM by Jaeyoun Yi

# Can't install this package!

It is exact what we want to hear!!!

However, I can't install this package on my computer. It shows an error message and denies to install.

Actually my message was in Korean but the error message may be translated into:

Since there is no upgradable program, Windows Installer service cannot install the upgrade-patch.

I'm using VS2005-SP1 (Korean) on Vista64 Ultimate K.

Tuesday, November 13, 2007 11:26 PM by Olivier

# re: Performance Improvements in Visual C++

Holy cow! Yes!

I'm going to try this out _immediately_.

:^)

Wednesday, November 14, 2007 2:24 AM by Marian Luparu [MSFT]

# re: Performance Improvements in Visual C++

Matt,

  The QFE does not ship a new feacp.dll so it will successfully install even if feacp.dll is renamed - but leaving it renamed kind of defeats the purpose :).

Todd Greer,

  The QFE requires SP1 so you will need to upgrade to use it. I am not sure I understand what's blocking you to upgrade. What do you mean by Vista-only builds?

Thanks,

Marian Luparu

Visual C++ IDE

Wednesday, November 14, 2007 5:35 AM by Daniel Coles

# re: Performance Improvements in Visual C++

Thanks very much.  I've installed the package, and look forward to trying it out shortly.

It doesn't sound like it addresses my worst performance problem with VS2005 though, which is that I cannot find a way to prevent the IDE from loading the header-file dependency information when accidentally editing a header file while running the debugger.  In VS6 this could be controlled through a registry entry:

HKCU\Software\Microsoft\DevStudio\6.0\Debug\ENCLoadIdbFiles.

Is this something that could be addressed in the future?  Or is anyone aware of a way to work around this?

Thanks,

Daniel Coles

Wednesday, November 14, 2007 5:38 AM by Jens

# re: Performance Improvements in Visual C++

When will this patch be available for non-english versions of VS2005?

Wednesday, November 14, 2007 5:44 AM by Jens

# re: Performance Improvements in Visual C++

Same problem as Jaeyoun Yi here with the german version of VS2005 SP1

Wednesday, November 14, 2007 6:30 AM by gyakoo

# re: Performance Improvements in Visual C++

You are talked about performance improvement, but, what about new functionallity in built-in VS intellisense, like Visual Assist X offers to our?.

Great job guys!

Wednesday, November 14, 2007 1:55 PM by Matt

# re: Performance Improvements in Visual C++

Sadly, these fixes don't fix our primary issue. Not to take away from the large amount of improvements that have been made... We have a solution with managed and unmanaged c++ projects. Managed c++ dll's have dependencies on unmanaged c++ static libs. Coding unmanaged c++ is a breeze, but if I just open a file in a managed project, one cpu pegs. Even with this fix. This is just as it was before the fix. All I have to do is ctrl-tab from the managed cpp file to an unmanaged file, and the processor rests. crtl-tab back, and cpu pegs again. Why does it feel the need to completely refresh intellisense when I just set focus to a managed c++ file in the text editor?? Even when the new debug-info thread count drops to zero in the status bar, my cpu stays pegged if I am editing a managed c++ file.

Please, if I could just have control over intellisense, I would be satisfied - I would like the ability to

1. manually freeze intellisense into a read-only mode,

2. manually refresh intellisense db if I feel it is necessary.

Are these available through the new macros mentioned in the last paragraph of the blog? I'm ready for a tutorial,

Thanks,

-Matt

Wednesday, November 14, 2007 2:24 PM by QbProg

# re: Performance Improvements in Visual C++

It doesn't install over VS Professional Italian SP1, Windows XP. What can I do?

Wednesday, November 14, 2007 2:35 PM by Jim Springfield

# re: Performance Improvements in Visual C++

OK, a couple of more things.

You definitely want to be running SP1 before installing this.  FEACP.DLL was not updated in this patch, but there was a fix in SP1 for an infinite loop that was fairly common.

There is apparently a problem with installing the patch on non-english versions of VS that we are looking into.  There are no localized resources in the three DLL's that are included in the patch, so if you have an english system available to install on, you should be able to copy the DLL's manually.  They are vcpkg.dll, vcproject.dll, and vcprojectengine.dll.

Matt, it sounds like your issue with the managed cpp file is related, but different.  The Intellisense parsing code doesn't really care which file has the focus.  Have you talked to PSS or opened a connect bug?  The macros will allow you to do the two things you ask for.  if this helps your problem, that would be good info to know.

Wednesday, November 14, 2007 5:16 PM by Todd Greer

# re: Performance Improvements in Visual C++

Marian,

My memory is a little fuzzy at the moment, and we didn't end up fully characterizing the problem. I think that the situation when we simply upgraded to SP1 was that our builds would only run on systems with SP1 installed (this is different from what I originally said; my memory is, as I said, fuzzy). I think we then replaced the redistributable MS dlls with SP1 ones, and then had manifest difficulties. At this point, we had to put the upgrade on hold, as we needed to ship, and the SP1 improvements weren't enough to justify more work. If you like, I'll let you know how it goes when we pick it back up in a couple of months.

Wednesday, November 14, 2007 6:23 PM by Russ

# re: Performance Improvements in Visual C++

About time too. VC6 flies like the wind on my quad core but the later 2005 (and 2008) runs like slow setting concrete. Sorry to say that I don't plan to use it for anything but mobile development (only because EVC is a steaming pile of...)

I'm almost ashamed to say that VC6 is still the clear winner considering all I want is a decent C++ IDE and integrated toolchain.

Wednesday, November 14, 2007 7:12 PM by Norman Diamond

# re: Performance Improvements in Visual C++

"There is apparently a problem with installing the patch on non-english versions of VS that we are looking into."

Thank you for looking into it.  May I make a suggestion for the future?  The suggestion is colloquially called "dogfooding".

(I didn't try it in Japanese yet because of a coincidence in timing:  in order to get some real work out the door I'm going to stick with an environment whose bugs I'm used to.  So if Japanese happens to be an exception to the need for dogfooding, and I haven't checked it, it might be an unchecked exception, sorry.)

Thursday, November 15, 2007 2:34 AM by Jens

# re: Performance Improvements in Visual C++

Anyone here who tried the patch with VS2005 Professional? It seems that the .msp file of the patch does not contain the product code of VS2005 Prof. and therefore the patch refuses to install.

Thursday, November 15, 2007 2:41 AM by QbProg

# re: Performance Improvements in Visual C++

Jens, I have the same problem with Professional...

Thursday, November 15, 2007 11:38 AM by John

# re: Performance Improvements in Visual C++

Rats!  

The package installed cleanly, and it does seem to improve performance, so many kudos for that.

I was hoping it would fix the other IntelliSense-related problem I have, though, which is this: if I specify global scope using the scope operator, right after I type the second ':', VS2005 SP1 crashes[*] while IntelliSense is populating its suggestion list.

This behavior continues after the new HotFix.  Oh well.

[*] Where "crashes" is defined as "Microsoft Visual Studio 2005 has stopped responding" followed by shutdown.

Thursday, November 15, 2007 11:47 AM by Bob

# Improvements in diagnostics too?

My main question is:

Are there significant improvements in the core c++ compiler like

a) producing faster executable code

b) significant improvement in diagnostics/static code analysis

Thursday, November 15, 2007 1:32 PM by Alex

# re: Performance Improvements in Visual C++

Thanks for all of your hard work! The developers community is certainly grateful for this patch!

I've tried the patch yesterday, which by the way did install successfully on VS2005 professional (at least that’s what the install shield reported to me), and the difference is certainly noticeable! First of all let me describe the solutions that our team is working on. The solutions consists of up to 341 projects, all of which are buildable with Win32/Win64 Debug/Release configurations. Prior to the patch the after loading the solution that contains 341 projects, VS would always crash after ~5 minutes of use, so the only workaround we had was to rename the intellisense dll. But after installing this patch, I’ve been running that solution without any apparent problems. Even thought the response time has improved dramatically, I still witness ~5 second freezes with ~1 second of response time every ~6 seconds (which is an improvement from 1 minute freezes reported by our developers). This, however, is still too slow and irritating for any productive work to be done, so manually disabling the intellisense feature (or the update of intellisense) would be great. Can you please PROVIDE the details of how this can be done? You said “I’ve added a few flags that can be set using VS macros that do things such as disabling Intellisense almost completely or disallowing updates to the NCB while allowing queries” – please, please, PLEEEEEASE show how we can do this. I’ve googled and googled and still didn’t find how this is done.

Friday, November 16, 2007 3:02 AM by QbProg

# re: Performance Improvements in Visual C++

Please, give informations about installing over professional SP1! (italian)

Friday, November 16, 2007 3:34 AM by RenaZard

# re: Performance Improvements in Visual C++

How Can I Get KoreaVersion?

DownLoad that Link. I Can't Install.

T.T

Friday, November 16, 2007 8:30 AM by Sylvester Hesp

# re: Performance Improvements in Visual C++

How can I remove the hotfix? Because it seems it's not compatible with the Xbox 360 SDK

Friday, November 16, 2007 9:38 AM by Sylvester Hesp

# re: Performance Improvements in Visual C++

Ah right, found it, forgot to check the "show updates" checkbox in the add/remove programs window ;)

But this sucks. After uninstalling the hotfix the XDK still complains, and I can't reinstall the XDK because it says "some files have changes". I am now in the tedious process of reinstalling VS 2005 SP1, which takes a long, long time. Another day wasted doing nothing. Yay.

Friday, November 16, 2007 11:33 AM by Jared

# re: Performance Improvements in Visual C++

Jim Springfield: You and the VC++ team did a good job on this hotfix!  IDE performance has noticeably improved when loading and working with VC++ projects. You guys are definitely doing some good work cleaning up some massive kludges.  That said, performance is still very poor compared to VS 6 which really does fly like greased lightning.  Will there be more VC++ performance hotfixes?

I genuinely appreciate that MS appears to have re-started  investing in native VC++.  My sincere hope is that we (native VC++ developers) are not getting Windows ME-d with perf improvements and MFC additions.

Also, while we are discussing performance I have a serious question: Is there any chance the Visual Studio team (or at least the VC++ team) will have something of major Performance reset, where performance is considered across the board and everything stops until all aspects of performance are reviewed and addressed?  (IDE perf, libraries perf, mfc classes perf, compiler perf, etc).  I ask b/c I know Microsoft has a serious Security initiative (b/c executives recognize the criticalness of Security, and that security must be baked-in).   What are you doing to bake-in performance?

Thanks much,

jared

Friday, November 16, 2007 2:43 PM by Zach

# re: Performance Improvements in Visual C++

Jim Springfield: Thank you and your team so much! The performance difference is noticeably better. Even more important (for me) is that now a number of the Intellisense features now *work* for a specific project I'm working on. Many of these features have not worked for this project in the 5 years it's been under development!

Monday, November 19, 2007 8:13 AM by hurzler

# re: Performance Improvements in Visual C++

Jens wrote:

Anyone here who tried the patch with VS2005 Professional? ...

Yes. Works fine with VS2005 Professional SP1 English versions on XP and Vista.

---

Matt wrote:

Please, if I could just have control over intellisense, I would be satisfied - I would like the ability to

1. manually freeze intellisense into a read-only mode,

2. manually refresh intellisense db if I feel it is necessary.

That's exactly what I was wishing ever since I started using VS2005. I believe one of Intellisense's major problems is trying to do too much too often.

Still, it chickens out on the first simple template declaration it encounters... :/

---

Jim Springfield: You mentioned those MACROS on several occasions. If you could finally drop some info on how to access them, pleeeaaaase?

Monday, November 19, 2007 10:40 AM by Bob

# IDE

I completely agree with Jared's statement "performance is considered across the board and ... all aspects of performance are reviewed and addressed".

1. Improve compiler generated machine code performance

2. Dramatically improve static code checking / compile time warnings / diagnostics

3. Produce code complexity metric / code quality metrics.  We want to integrate this into our build process so that no code gets checked in until it a) builds without error and  b) does not get flagged with bad code metrics (too complex, unmaintainable, etc).  This would essentally take a FxCop type of output and filter it for a set of errors before code checkin.

4. (Nice to have) Refactor method to convert a  member function to a static method.  We are finding it much easier to maintain static member functions since the method does not depend on any context from the class.

For #4, our code was written over the last 10 years and many many of our classes are used essentially like a simple function call.

a) allocate/construct class

b) set member variables

c) call member function

d) de-construct/deallocate class

This type of code is bloated when the constructor and set member variables (parts a and b) only just set member variables and do no real work.  We end up having at least 4 function calls made (a,b,c,d) just to call a simple member function in that class.  Converting that to a single static member function a) eliminates the 4 function calls, b) improves performance (compiler can better optimize the static call) and c) (most importantly) is easier and lower cost to maintain.

This cuts about 5 to 10 lines of code out every time the function is called and, over a large project ~150,000 lines of code, saves several thousand lines of code.

This is much more maintainable for us.

Monday, November 19, 2007 10:47 AM by Visual C++ Team Blog

# Controlling IntelliSense Through Macros

Hi, my name is Jim Springfield, and I’m an architect on the Visual C++ team. When I recently blogged

Monday, November 19, 2007 10:58 AM by Noticias externas

# Controlling IntelliSense Through Macros

Hi, my name is Jim Springfield, and I’m an architect on the Visual C++ team. When I recently blogged

Tuesday, November 20, 2007 9:09 AM by hurzler

# re: Performance Improvements in Visual C++

Geez, what's happening? Just figured out by chance that you have to click on either of the above "names" (Visual C++ Team Blog / Noticias externas) to get to the "Controlling IntelliSense Through Macros" page. That's weird, but hey, thanks Jim! :)

Wednesday, November 21, 2007 4:41 AM by Richard B

# re: Performance Improvements in Visual C++

This fix seems to have worked for me on VS2005 SP1. I'm also testing out VC++ 2008 Express and am loving the new /MP option which has cut my build times by two-thirds on a quad core :)

What do you need to enable 64-bit development on VC++ 2008, since the 64-bit compilers are included with the installation, and without them you can't target x64 (a download link would be handy as I'm struggling to find out exactly what I need to install) ?

Wednesday, November 21, 2007 4:42 AM by Richard B

# re: Performance Improvements in Visual C++

My question should have been "What do you need to enable 64-bit development on VC++ 2008 Express" ?

Thursday, November 22, 2007 8:21 AM by Greg Smith

# re: Performance Improvements in Visual C++

Thank you for your work on performance improvements. I installed your patch on VS2005 SP1 (by the way, the patch takes a very long time to install). I suspect that things are better, except...

On 2 occasions, VS2005 has hung up after I have made changes to code while debugging. The hang happens after I apply code changes and after VS states "Done".

During the hang, Task manager reports that VS is using up memory with a delta of around 800 kB each refresh. Normally, VS uses around 128 MB of memory with a VM size of around 120 MB. On each occasion I stopped it with the memory use up to 400 MB and the VM use a little larger.

If this happens again, is there any information I can pass on that might help debugging this?

Saturday, November 24, 2007 12:54 AM by CD

# re: Performance Improvements in Visual C++

For one or our large C projects this made a definite improvement. Our other large one is now worse with the IDE hanging. All we get is the hour class (VS not responding). The second solution has 3k+ files in a single project file.

CD

Saturday, November 24, 2007 2:21 PM by vcblog

# re: Performance Improvements in Visual C++

Hi CD,

Can you contact us so we can investigate? The easiest way to do this is to use the "email" link under "This Blog" in the lefthand navigation pane.

Ronald Laeremans, Visual C++ Product Unit Manager

Monday, November 26, 2007 3:31 PM by Brigadir

# re: Performance Improvements in Visual C++

Hello!

I cannot install VS80sp1-KB943969-X86-ENU.exe w/ Visual Studio 2005 Professional SP1.

The installer works and finishes without any errors, but versions of these files are stays UNCHANGED:

• vcpkg.dll (8.0.50727.762)

• VCProject.dll (8.0.50727.762)

• VCProjectEngine.dll (8.0.50727.762)

Meanwhile, 'http://support.microsoft.com/default.aspx/kb/943969/en-us' says that versions must be as:

• vcpkg.dll (8.0.50727.943)

• VCProject.dll (8.0.50727.943)

• VCProjectEngine.dll (8.0.50727.943)

As a result, this hotfix is not applied and is not work.

The KB943969 hotfix is shown in updates list for Visual Studio 2005 (is it means that hotfix has been installed correctly?)!

Could You help me, please?

My system info:

• OS: Windows XP Professional x64 Edition Version 2003 Service Pack 2 (“Regional Options” are set to Russian; AMD Opteron CPU).

• Microsoft Visual Studio 2005 Version 8.0.50727.762 ENU (information from “About Microsoft Visual Studio” window).

• Microsoft Visual Studio 2005 Professional Edition - ENU Service Pack 1 (KB926601)

• Security Update for Microsoft Visual Studio 2005 Professional Edition - ENU (KB937061)

• Refactor! for Visual Studio & PowerToys

Thanks.

Wednesday, November 28, 2007 11:13 AM by Job

# re: Performance Improvements in Visual C++

A week days after installing the QFE, I think after making some changes to the core code of my solution (120 projects, 1.6M lines) the IDE start to allocate memory starting by 210MB then this memory start to increase and suddenly it jumps to 650MB and continue increasing up to 780MB and my PC appear to be hanged (I actually have only 1GB of RAM on my DELL Optiplex 745) until I terminate the VS2005.

My machine runs Windows XP SP2. and now I'm trying to open the project on my other Vista machine with 2GB of RAM. and I will inform you with the results later.

Thanks.

Wednesday, November 28, 2007 11:25 AM by Job

# re: Performance Improvements in Visual C++

After testing on Vista with 2GB of RAM, the amount of RAM allocated by IDE is only 340MB.

Thanks.

Wednesday, November 28, 2007 10:41 PM by phatee

# re: Performance Improvements in Visual C++

Thats a great work !!!

Thursday, November 29, 2007 5:15 AM by Greg Smith

# re: Performance Improvements in Visual C++

I have already reported a hang with the new intellisense loaded. I have just had a different problem:

I loaded my solution (containing some 15 projects, all native C++) and right clicked on a function name and asked to go to definition. VS2005 hung up using 0% CPU and Intellisense was showing (377) files to parse. Perhaps a deadlock between the editor request and building the Intellisense database?

The only way out was to kill the application.

Thursday, December 06, 2007 6:44 AM by Greg Smith

# re: Performance Improvements in Visual C++

I have just had another lockup. When I open my solution (with many sub projects), after a few seconds Intellisense starts scanning my files and diplays a number that starts around (470). If I ask to lookup a name while the intellisense message is visible, on at least 2 occasions the IDE has locked up with devenv.exe using 0% CPU. There is no way out (I have waited a long time) except to kill devenv.

Wednesday, December 12, 2007 1:16 AM by Marian Luparu [MSFT]

# re: Performance Improvements in Visual C++

Greg, can you save a crash dump of devenv.exe at the time of the freeze and send us the dmp file? This will help us investigate your issue further. Please contact me at vcperf at microsoft dot com.

Thank you,

Marian

Monday, July 07, 2008 6:30 PM by Extracting acetaminophen from ultracet.

# Ultracet.

Extracting acetaninophen from ultracet. Ultracet.

Tuesday, July 08, 2008 4:22 AM by Celexa drug.

# Celexa.

Celexa and pregnancy. Celexa nsaids. Withdrawals from celexa. Celexa dosage. Celexa. Generic celexa.

New Comments to this post are disabled
 
Page view tracker