Intellisense updates very slowly, and blocks builds - what can I do?

I'm working on a fairly large program, and the NCB file quickly rises to 90MB, especially after edit-and-continue.

Intellisense keeps firing up and showing "Updating intellisense" in the status bar, for several minutes at a time - but much worse than that, it appears to be (read-)locking files that a build needs, so if I use edit-and-continue, then stop debugging, the build that fires off collides with Intellisense and fails, and manual builds fail too, until Intellisense stops.

VC7 wasn't anywhere near this bad - it occasionally got confused, and didn't always understand namespaces, and it helped to delete the NCB sometimes - but it never chewed so much effort, nor do I ever recall it blocking builds!

Is there any way to make it behave better (I don't really want to turn Intellisense off, as - when it works - it's really useful).

(Running VC2005 on native C++, not managed, Windows XP/Pro on P4 2.66GHz with 1.5GB memory - surely that ought to be enough )



Answer this question

Intellisense updates very slowly, and blocks builds - what can I do?

  • never_again

    In order to help us investigate this issue, we need some more information.

    Does the build failure message mention which file it failed to open because it was locked (or being used by another process) If yes, what is this file

    Is it a generated file that the build would delete and then regenerate (in case the message didn't say which file, then do you know if the build does attempt to delete some source/header files and then regenerate them)

    Thanks,

    - Ameya Limaye

    AmeyaL(thisIsTheAtSign)(MSFTFullForm)(dot)com



  • coder#

    Ok ... more has become obvious.
    I missed that after an Edit-and-Continue debug run, VC2005 starts a build anyway, and that locks the output files.
    Since the build is running, the Updating Intellisense runs very slowly, and is the one thing visible in the status bar. (A fault reported by others - Intellisense wipes the status bar with its own messages, so you lose important messages!)

    So, a manual build at this time is neither needed, nor able to succeed, because of the automatic build... Not the fault of Intellisense, other than it putting itself into the "firing line"!


  • Zoran Simic

    I run into this constantly, like multiple times in a week. I will see the message "Updating IntelliSense" in the status bar and it remains there for many minutes (sometimes 10 or more). During that time Visual Studio is essentially useless. I really wish there was a way to configure this feature so that it didn't interrupt my work, like certain hours that it can run, disable updates completely, manual updates only, or, ideally, change it so that it doesn't block so many basic functions.
  • Holger Sachs

    I had a problem where the NCB file was continually being regenerated, i.e. the status bar showed that it was almost done, then it jumped back to 20% done. I concluded that the NCB file was somehow corrupted. So I deleted the NCB file, and then let it regenerate overnight, and since then I haven't had the "endless looping of NCB generation" problem.

    But if you have the problem, it might be a good idea to let the NCB file generate fully, then mark it as read only, so it can't be written to. It might speed things up.


  • Lutz Fritsche

    With some STL references and simple custom collection classes (linked list, stack, ques etc) in a console project the ncb grows to over 1M and it take several minutes to update. Everytime I open the project the computer is slowed down for tens of minutes. And what is more annoying is that I can not create a class in the class wizard before the intellisense is updated. The class wizard simply hangs the IDE until the intellisense is updated.

  • Intellisense updates very slowly, and blocks builds - what can I do?