Improving C++ Intellisense Performance with PCH

Improving C++ Intellisense Performance with PCH

  • Comments 23

Thank you to everyone who has submitted feedback on the Visual Studio Release Candidate. We have received feedback that C++ Intellisense performance is slower. One way to improve this is to enable Pre-Compiled Headers usage for Intellisense parser. Andy Rich has written a detailed post on intellisense PCH usage that gives some additional details and explains how to optimize your intellisense engine with PCH. Here are a few of the benefits of using PCH:

·         Improves Intellisense parser performance in the IDE

·         iPCH is on by default as long as your project is using PCH


Thank you,


Kelly Evans

Visual C++ Team

Leave a Comment
  • Please add 5 and 1 and type the answer here:
  • Post
  • I think it's better than Beta2, especially for stability.

    Beta2's C++ Intellisense was unacceptably unstable.

    Beta2 stopped working just include the <functional> header(which has really complicated classes like std::function and std::bind)

    RC's Intellisense is somewhat okey stability compared with Beta2.

  • One thing I noticed is that the whole IDE restores itself when minimzed, when VS2010 RC suddenly feels the urge to "scan #includes for additional files". This is a bit annoying, if the program is minimzed, it should never restore itself automatically. I usually work with the IDE maximized, then I sometimes minimize it and intend that it stays that way. Sometimes it just pops back (when doung this scan), after various delays (several minutes).

  • Please take a look at this CONNECT issue about PCH, it is still there in VS2010 RC:

  • Does Visual Studio 2010 present an option to the user to disable intellisense completely?

    Or will we have to rely on hacking the dll again?

  • grp:

    There is an option to disable it. If you dig through the options then you will find it.

  • @hito:

    Yes, post Beta2 we've fixed bugs around handling simplifying resolved template overloads (std::bind has 410 overloads) and improved responsiveness when displaying template mangled names in tooltips , which was the culprit when using <functional>.  I hope RC/RTM intellisense is more than "somewhat okay".  Please share if you have more feedback.


    Ulzii Luvsanbat

    Windows C++ Team

  • @Axel:

    Yes, we're getting few feedback from customers that this is happening.  We have an active bug logged for this in our database.  We will see if we can make a fix in time for VS2010 RTM, if not it will definitely be fixed in the next release.


    Ulzii Luvsanbat

    Windows C++ Team

  • I can confirm that IntelliSense is much better than in VS 2008. I haven't tested it in a big project yet, but typical cases with templates work much better now. Great job!

    The connect issues mentioned by nbelyh is irritating, though.

  • Is there an option to share the intellisense database of a solution between computers? Our project is pretty huge by itself and uses plenty of open sources, generating the intellisense database took hours on a quad-core PC (and even then it took several seconds for intellisense to work properly). Once someone has a big enough database, can he share it among others to save time?

  • Hmm, unfortunately your question isn't specific enough but I think the easy answer would be no in general.

    The database is always locked by the first instance of VS which opens the project. So the second and subsequent opens would end up being opened with the intellisense being placed elsewhere so it would have to be rebuilt. Whats more a shared intellisense database would actually be pretty hard to do. If two people edited the same piece of code, which one would the intellisense database reflect?

    There is nothing stopping you from copying the database with the project though. Everything generated up until that point will be ok. The project is set to look in a certain location for a certain file name on load, it doesn't matter where it comes from.

  • Poor choice of words in my original question, I meant if it's safe to copy the database around, thanks for the tip.

  • @Mike The Pie:


    I confirm that we still have the bug that's reported in CONNECT from 2006.  We are very sorry that this hasn't been addressed in VS2010, it's complete failure on our part.

    If it makes you feel better, in VS2010 there will be a visible red squiggle line under the #include statement that explicitly says intellisense cannot find the file, and once you do the workaround of prepending with "..\" the squiggle will go away.  I know it's not what you really want, because build still succeeds with the squiggles.  How bad is this bug to you?  I can definitely make sure that this gets fixed in the next servicing update.


    Ulzii Luvsanbat

    Windows C++ Team

  • @Ulzii Luvsanbat

    Actually that bug is a problem for us as well since we depend on intellisense for some auto-generated code so we need the intellisense database to be as complete as possible.  I know it's scary but it's easier than writing a C++ parser.

  • Crescens2k: "There is an option to disable it. If you dig through the options then you will find it."

    This is great, but when it's disabled is IntelliSense available (Go to Definition, ToolTips, etc.)? Does disabling prevents any further updates to the .ncb?

  • @cguillemette : ToolTips (QuickInfo )is not going to work when Intellisense is in disabled state. Go To Definition may succeed at some places and fail at other. Disabling Intellisense will not prevent store updates as some features like ClassView  depend on store or database for latest constructs added in code.  

    We would be interested in any feedback you have about Dev10 Intellisense


    Rashid Sarwar

    Windows C++ Team

Page 1 of 2 (23 items) 12