Welcome to MSDN Blogs Sign in | Join | Help

Rebuilding Intellisense

Hi, my name is Boris Jabes. I've been working on the C++ team for over 4 years now (you may have come across my blog, which has gone stale...). Over the past couple of years, the bulk of my time has been spent on re-designing our IDE infrastructure so that we may provide rich functionality for massive code bases. Our goal is to enable developers of large applications that span many millions lines of code to work seamlessly in Visual C++. My colleagues Jim and Mark have already published a number of posts (here, here and here) about this project and with the release of Visual Studio 2010 Beta 1 this week; we're ready to say a lot more. Over the next few weeks, we will highlight some of the coolest features and also delve into some of our design and engineering efforts.

In this post, I want to provide some additional details on how we built some of the core pieces of the C++ language service, which powers features like Intellisense and symbol browsing. I will recap some of the information in the posts I linked to above but I highly recommend reading the posts as they provide a ton of useful detail.

The Problem

Without going into too much detail, the issue we set about to solve in this release was that of providing rich Intellisense and all of the associated features (e.g. Class View) without sacrificing responsiveness at very high scale. Our previous architecture involved two (in)famous components: FEACP and the NCB. While these were a great way to handle our needs 10+ years ago, we weren’t able to scale these up while also improving the quality of results. Multiple forces were pulling us in directions that neither of these components could handle.

1.       Language Improvements. The C++ language grew in complexity and this meant constant changes in many places to make sure each piece was able to grok new concepts (e.g. adding support for templates was a daunting task).

2.       Accuracy & Correctness. We need to improve accuracy in the face of this complexity (e.g. VS2005/2008 often gets confused by what we call the “multi-mod” problem in which a header is included differently by different files in a solution).

3.       Richer Functionality. There has been a ton of innovation in the world of IDEs and it’s essential that we unlock the potential of the IDE for C++ developers.

4.       Scale. The size of ISV source bases has grown to exceed 10+ million lines of code. Arguably the most common (and vocal!) piece of feedback we received about VS2005 was the endless and constant reparsing of the NCB file (this reparsing happened whenever a header was edited or when a configuration changed).

Thus, the first step for us in this project was to come up with a design that would help us achieve these goals.

A New Architecture

Our first design decision involved both accuracy and scalability. We needed to decouple the Intellisense operations that require precise compilation information (e.g. getting parameter help for a function in the open cpp file) from the features that require large-scale indexes (e.g. jumping to a random symbol or listing all classes in a project). The architecture of VS2005 melds these two in the NCB and in the process lost precision and caused constant reparsing, which simply killed any hope of scaling. We thus wanted to transition to a picture like this (simplified):

At this point, we needed to fill in the blanks and decide how these components should be implemented. For the database, we wanted a solution that could scale (obviously) and that would also provide flexibility and consistency. Our existing format, the NCB file, was difficult to modify when new constructs were added (e.g. templates) and the file itself could get corrupted leading our users to delete it periodically if things weren’t working properly in the IDE. We did some research in this area and decided to use SQL Server Compact Edition, which is an in-process, file-oriented database that gives us many of the comforts of working with a SQL database. One of the great things of using something like this is that gave us real indexes and a customizable and constant memory footprint. The NCB on the other hand contained no indexes and was mapped into memory.

Finally, we needed to re-invent our parsers. We quickly realized that the only reasonable solution for scalability was to populate our database incrementally. While this seems obvious at first, it goes against the basic compilation mechanism of C++ in which a small change to a header file can change the meaning of every source file that follows, and indeed every source file in a solution. We wanted to create an IDE where changing a single file did not require reparsing large swaths of a solution, thus causing churn in the database and even possibly locking up the UI (e.g. in the case of loading wizards). We needed a parser that could parse C++ files in isolation, without regard to the context in which they were included. Although C++ is a “context sensitive” language in the strongest sense of the word, we were able to write a “context-free” parser for it that uses heuristics to parse C++ declarations with a high degree of accuracy. We named this our “tag” parser, after a similar parser that was written for good old C code long ago.  We decided to build something fresh in this case as this parser was quite different than a regular C++ parser in its operation, is nearly stand-alone, and involved a lot of innovative ideas. In the future, we’ll talk a bit more about how this parser works and the unique value it provides.

With the core issue of scalability solved, we still needed to build an infrastructure that could provide highly accurate Intellisense information.  To do this, we decided to parse the full “translation unit” (TU) for each open file in the IDE editor* in order to understand the semantics of the code (e.g. getting overload resolution right). Building TUs scales well – in fact, the larger the solution, the smaller the TU is as a percentage of the solution size.  Finally, building TUs allows us to leverage precompiled header technology, thus drastically reducing TU build times.  Using TUs as the basis for Intellisense would yield highly responsive results even in the largest solutions.

Our requirements were clear but the task was significant. We needed rich information about the translation unit in the form of a high-level representation (e.g. AST) and we needed it available while the user was working with the file. We investigated improving on FEACP to achieve this goal but FEACP was a derivation of our compiler, which was not designed for this in mind (see Mark’s post for details). We investigated building a complete compiler front-end designed for this very purpose but this seemed like an ineffective use of our resources. In the 1980s and 1990s, a compiler front-end was cutting-edge technology that every vendor invested in directly but today, innovation lies within providing rich value on top of the compiler. As a result there has been a multiplication of clients for a front-end beyond code generation and we see this trend across all languages: from semantic colorization and Intellisense to refactoring and static analysis. As we wanted to focus on improving the IDE experience, we identified a third and final option: licensing a front-end component for the purposes of the IDE. While this may seem counter-intuitive, it fit well within our design goals for the product. We wanted to spend more resources on the IDE, focusing on scale and richer functionality and we knew of a state-of-the-art component built by the Edison Design Group (commonly referred to as EDG). The EDG front-end fit the bill as it provides a high-level representation chock-full of the information we wanted to build upon to provide insight in the IDE. The bonus is that already handles all of the world’s gnarly C++ code and their team is first in line to keep up with the language standard.

With all these pieces in place, we have been able to build some great new end-to-end functionality in the IDE, which we’ll highlight over the coming weeks. Here’s a sneak peek at one we’ll talk about next week: live error reporting in the editor.

* - We optimize by servicing as many open files as possible with a single translation unit.

Published Wednesday, May 27, 2009 9:23 AM by vcblog

Comments

Wednesday, May 27, 2009 1:34 PM by Sunil Joshi

# re: Rebuilding Intellisense

I noted that intellisense is no longer available for C++ / CLI in the Beta.

Is this intended to be remedied before RTM?

I know that your team seems not to really care about C++ / CLI anymore but some people still have projects to maintain.

Wednesday, May 27, 2009 1:48 PM by Boris Jabes [MSFT]

# re: Rebuilding Intellisense

Sunil -

We completely empathize with the need to work with C++/CLI and we think it's a great way to do interop between native code and managed code. As part of this re-architecture, we had to make the difficult decision to reduce the scope to native C++ only for Intellisense. We still index symbols coming from C++/CLI code and you can browse them with Class View etc...

While the lack of Intellisense for C++/CLI is unfortunate, we expect that it only represents a small portion of your source code that you don't need to edit nearly as often as the native code. Indeed, the only scenario we don't recommend is to use C++/CLI as a first-class .NET language. Instead, we think it's the ideal solution for interop.

Wednesday, May 27, 2009 2:09 PM by Sunil Joshi

# re: Rebuilding Intellisense

There are two scenerios where this is inconvenient:

1 Trying to use a native api in a file compiled clr (I.e. When you have included a native header and want to remember the parameters.)

2 trying to use a BCL type in your project (I am do not write a lot of managed code and found the intellisrnse helped with api discovery.)

All I want to do is wrap a native library so that it can be called from a c# Wpf application. I only want to write around two classes in c++/cli. I don't need intellisrnse for the c++/cli code I am writing but for my native types and the managed dlls I am consuming.

Surely this should be possible (I.e. Get the Edg parser to ignore managed type declarations parse ordinary c++ code and just use reflection to provide ibtellisense for existing managed dlls)

Btw generally I am pleased with the IDE improvements including squiggles

Wednesday, May 27, 2009 5:30 PM by adi hodos

# re: Rebuilding Intellisense

Well congratulations , I like very much the new Intellisense , so far from what I've tested it's way better and responsive than it was in VS2005/VS2008. Please do make some improvements on the code editor though : richer syntax highlighting , support for different coding styles ( K & R style / GNU style / user defined ). Just take a look at Eclipse CDT / NetBeans CPP pack , they offer so many options for these things. I'm sorry to say it but when it comes to pure text editing , even the venerable Vim surpasses the built in editor of VS.

Wednesday, May 27, 2009 7:14 PM by Phil

# re: Rebuilding Intellisense

One of the things I really don't like about netbeans is that there is constant movement in the editor while I type. I keeps deciding my line I am typing has an error, then it changes its mind and decides something else is an error, and the red underlines dance all over the context of my typing.

I hope with VC++, the red underlines are not so distracting. Also, make sure they can be turned off.

Wednesday, May 27, 2009 8:31 PM by Boris Jabes [MSFT]

# re: Rebuilding Intellisense

Phil -

I definitely hope our "underlines" aren't distracting. We've actually done some tweaks to improve the experience. Actually, one of my colleagues is going to post a more detailed blog entry soon. As for turning them off: we've added a ton of "power user" options under Tools > Options > Text Editor > C/C++ > Advanced, including the one you ask for.

Wednesday, May 27, 2009 10:31 PM by Leo Davidson

# re: Rebuilding Intellisense

If we're talking text editors, there's a feature from TextPad I would love to see in Visual Studio:

If you go to column X and type Y characters, then push down, you'll be back at column X again on the next line (not at column X+Y as with most editors including Visual Studio).

Once you use an editor which does this you never want to go back, especially when editing monospaced, often-tabular data such as source-code.

I'm looking forward to the new intellisense! I think that and the C++0x features will make me overlook my distaste for the new UI. (Do any teams at Microsoft know about "standard look & feel" anymore? :( If I wanted every application on my desktop to look completely different I'd be using Unix. :-)) I guess I'll have to get used to it, though, and the under-the-covers changes sound very compelling, so good work there.

Thursday, May 28, 2009 2:15 AM by dvy

# re: Rebuilding Intellisense

Good,use compact SQL is good idea,I wish Intellisense improve speed in very large c++ project over numerous million lines of code.

Thursday, May 28, 2009 5:36 AM by Sunil Joshi

# re: Rebuilding Intellisense

The other thing I noticed was that intellisense does not like R-value references and Lambdas. This is presumably because the EDG front-end does not support them yet.

I hope this can get fixed before RTM.

Thursday, May 28, 2009 7:19 AM by Boris Jabes [MSFT]

# re: Rebuilding Intellisense

Sunil -

Good call on Intellisense with C++0x features. You'll see that coming in Beta2 :)

Thursday, May 28, 2009 7:58 AM by Kim Gräsman

# re: Rebuilding Intellisense

It feels a little scary to me to have one compiler provide typing support and preventative checking and another doing the actual compilation.

Maybe it's not such a big deal, but I'd hate being stuck with a squiggly error mark for something that EDG doesn't accept, but cl.exe builds without a hitch.

The other way around (i.e. EDG accepts something cl.exe doesn't) is almost as bad.

Sounds promising otherwise!

Thursday, May 28, 2009 8:18 AM by QbProg

# re: Rebuilding Intellisense

Delphi has different front-ends and it commonly marks errors even if the code is correct!

--

About C++/CLI : Are you jocking?! No intellisense!?

You should really take a decision: to support or not to support the language! You can not put "C++/CLI" templates then not have intellisense for it! It doesn't make any sense!

The statements like "you don't really require intellisense for C++/CLI" are terrific!

I use C++/CLI to expose the object model of the application I use and having intellisense disable is much worst of using P/Invoke on each function call !

Given this fact, I simply won't upgrade to VC++ 2010!

(and I'm really tired of using features abandoned the next VS version!)

Thursday, May 28, 2009 8:22 AM by Patrik

# re: Rebuilding Intellisense

I like the new IntelliSense, but it still seems lacking. For example, when starting to type something, IntelliSense STILL doesn't offer any suggestions (this works in other languages such as C# or with a 3rd-party IntelliSense tool such as Visual Assist X).

And the other problem is that IntelliSense is still very, very slow. Indeed, it's so slow that it actually sometimes is hardly of any use! By this I mean the "Live compilation" part. It's still responsive when offering up suggestions.

The live compilation tends to mark stuff wrong for a long time before changing its mind and thinking it's right. This is not right and must be fixed.

Also, the go to declaration and/or definition feature is much slower than the VS08 version. In fact, it's much slower. When I tried, it stood there waiting, blocking for something like half a minute before jumping to the declaration. This is inexcusable! I hope you can fix this before the RTM.

On a side note, I like the new IDE very much, but as with all previous releases, it seems every release is also a step back - they are all slower than previous versions. In fact, the 2010 IDE is now so slow that it's counter-productive to use it. It uses up EVEN MORE memory then previous versions too! It's literally a memory hog. This is really something Microsoft MUST fix!

On (yet another) side note... I couldn't find the VC++ paths in the options anymore... but I did find something in the project configuration? What is the reasoning behind this? It seems a step back to me.

Thursday, May 28, 2009 9:02 AM by adi hodos

# re: Rebuilding Intellisense

It seems that for templates Intellisense doesn't work quite right, if I have something like this :

template<typename T>

struct list_node {

 struct list_node*     flink_;

 struct list_node*     blink_;

 T                     data_;

 list_node() :

   flink_( 0 ) ,

   blink_( 0 ) ,

   data_() {

 }

 list_node( const T& element ) :

   flink_( 0 ) ,

   blink_( 0 ) ,

   data_( element ) {

 }

 ~list_node() {

 }

};

template< typename T >

class linked_list {

private :

 list_node<T>*   sentinel_;

 size_t          items_;

public :

 linked_list();

 ~linked_list();

 void  push_front( const T& element ) throw();

 void  push_back( const T& element ) throw();

 T*    pop_front( void ) throw();

 T*    pop_back( void ) throw();

 void  clear( void ) throw();

 inline size_t items( void ) const throw();

 inline bool empty( void ) const throw();

};

when inside a member function and typing sentinel_->blink_-> gives the No members available error. Works flawlessly for the non-template version though.

Thursday, May 28, 2009 9:30 AM by small_mountain

# You must fix C++/CLI Intellisense

Boris,

You seem like a nice guy, Boris, but not supporting Intellisense for C++/CLI is a huge slap in the face for those of us trying desperately, with precious little support from Microsoft, to move existing MFC applications forward to WPF.  "Managed code is the future!" says Microsoft.  "But if you are one of those many existing applications that has helped make Microsoft Windows successful, and you are using C++/CLI to ease into managed code, No Soup For You!"

With existing code and existing header file dependencies, even though we are doing everything we can to limit our use of C++/CLI, there are significant limits to the extent to which we can reduce it.  And the reality is that we have 3 developers who will be spending at least half of their time in C++/CLI code for the foreseeable future.  We have Intellisense now in C++/CLI code with Visual Studio 2008, and it actually works 70% of the time.  How is it that I explain to these developers (one of which is me, by the way) that their productivity is to be halved so that native C++ developers and C# developers can have better Intellisense?

If C++/CLI is not included, VC10 Intellisense is a failure.  Period.  End of discussion.

Thanks,

Eric

Thursday, May 28, 2009 9:48 AM by leftoutinthecold

# You must be kidding!

As a C++ CLI dev this is a huge show-stopper.

Imagine that the next version of Word follows this pattern and decides to buy the spell checking technology from a third party. Alas, the component doesn't have legal terms. Well lawyers are a small subset of Word users, it's okay for them to not get red squigglies. Sorry guys.

epic fail.

Thursday, May 28, 2009 10:07 AM by Mohamed Benaichouche

# re: Rebuilding Intellisense

How is the designer going to work for people who have there UI written in C++/CLI, or is it independant of the Intellisens database?

Mohamed

Thursday, May 28, 2009 11:05 AM by Sunil Joshi

# re: Rebuilding Intellisense

Maybe you could ask (pay) EDG to support C++ / CLI.

They're pretty good front end devs.....

Thursday, May 28, 2009 11:28 AM by Andrey Tch.

# re: Rebuilding Intellisense

How about utilizing EDG front-end for the compiler as well?

Thursday, May 28, 2009 12:26 PM by Zachary Henkel

# re: Rebuilding Intellisense

Thanks for finally rendering even this MSFT apologist speechless with the removal of intellisense support for C++/CLI.  I appreciate this heads up that C++/CLI is a second class language that will never truly have support for any advanced IDE features that I was used to with C#. For this developer 10 isn't the new 6, it's the new Notepad.  I guess Visual Studio 2008 and VisualAssistX will be the "final" IDE that gets used.  

Thursday, May 28, 2009 1:29 PM by Cygnus X-1

# re: Rebuilding Intellisense

I'd like to add seconds to each of the posters who asked/demanded support for C++/CLI.

To you at Microsoft, I don't think you realize that C# isn't the great language you think it is (and neither is java, so stop trying to compete with it).  Never mind the inexplicable lack of determinate destructors, it becomes unwieldy in any reasonably large project.  Did you ever think of maybe devoting some of your C# (or F# or whatever that waste is) to C++/CLI?

Thursday, May 28, 2009 1:51 PM by Ricardo Costa

# re: Rebuilding Intellisense

For me it's a pleasure to see native C++ being treated as priority. We don't have to buy all that ".NET is the (only) future" thing yet.

But I see that C++/CLI is an important scenario for some people, so I believe the Intellisense support should come back with a Service Pack at least.

Thursday, May 28, 2009 3:32 PM by Andy Rich

# re: Rebuilding Intellisense

Adi -

Thanks for the bug report!  I've reproduced it on our end, and filed it in our bug-tracking database.  Hopefully we can fix that issue before Beta2!

Thanks,

Andy Rich

Visual C++ QA

Thursday, May 28, 2009 3:44 PM by small_mountain

# re: Rebuilding Intellisense

Ricardo,

I agree that .NET is not the "only" future - we have lots of native C++ code here, and it is unlikely the C++/CLI optimizer will ever be as good as the native one. And we are thrilled with the new native graphics APIs, Direct2D/DirectWrite.  But a lot of Microsoft's interesting new technology is built on the .NET stack, so it is unlikely that many native projects will not dabble in managed at some point.  So I think native developers should, as you, support C++/CLI not being relegated to complete second class status.

I think Microsoft's vision that native projects moving to managed will do most of the managed work in languages like C# is flawed.  We could not have successfully taken that approach with our product.  There is frequent need for managed code to call back into native code, and it's just too complicated to set up all the plumbing to make that work with C#.  We have been much more productive using C++/CLI.  We are using C# wherever it makes sense, mostly for some UI elements where XAML/Blend can be beneficial.

Anyway, thanks for your support.

Eric

Thursday, May 28, 2009 4:33 PM by Shane

# re: Rebuilding Intellisense

Quite the argument going on over intellisense?  Really, is intellisense the feature that makes or breaks a C coder?  I'm actually a little annoyed at this version of intellisense, when the popup comes up, you used to just be able to hit space (by default), now (at least by default) you have to type out a letter of the name for it to actually pick up the selection....

Anyhow, "Go to Defn.." and "Go to Decl.." still work fine for managed or native types.  Which is the perferred way to look data up anyhow, intellisense does and has always masked too much info from being able to really be usefull for anything serious.

So I suppose if your doing a lot of trivial programming in C++/CLI, the loss of intellisense may be a big deal.

Thursday, May 28, 2009 5:30 PM by Que

# C++/CLI

Visual Assist has its own, separated parser and supports C++/CLI. So probably we will get intellisense for C++/CLI in VS2010 with VA installed (after a VS2010 compatible build will be released)

Thursday, May 28, 2009 6:46 PM by anonymous coward

# re: Rebuilding Intellisense

I don't mean to be rude or impolite , but it seems to me that there are two main groups at Microsoft right now:

1. The "let's reinvent the wheel every two years or so" group. The problem with this group is that in the process they tend to forget whether the wheel should be round or squared. They absolutely have to use the latest gadgets and ( unproven ) technology , rewrite/redesign from scratch stuff , even though there is no real benefit for the users , ignore complaints from the community about what really needs to be improved. Just look how sluggish the interface is in VS 2010. Probably by 2016 you'll need to have a SLI setup and octocore processors to be able to work in Visual Studio :) .

2. The "don't reinvent the wheel unless it's absolutely necessary , but if you must do it don't forget it's round and do not break anything that worked before". In the past Microsoft has gone to great lengths to assure backwards compatibility for it's products and not only. Just read Raymond's Chen "The Old New Thing" book. The things they did just so that when you upgraded from Windows XX to Windows YY , software would still work are amazing.  

Every since .NET came around I see a disturbing change towards this attitude. Suddenly it's ok not to be backward compatible anymore , to break stuff , to reinvent the wheel just for the sake of it.

It is clear by now ( at least to me ) that group number one has overwhelmed group number two.

As for the C++/CLI people : sorry folks , looks like you're getting only a triangle shaped wheel this time :)

Friday, May 29, 2009 4:35 AM by Ian

# Very Scary!

As a C++ developer who has previously laboured under the woes of MFC for several years, being able to use the .NET apis from C++/CLI has been a major step forward. We have a lot of legacy (but still very useful) code in C++, and we are in the process of migrating our UIs to WPF. C++/CLI is an essential glue between these layers, and as a programming language actually has some nice features that I really like over C# - deterministic destruction for starters.

I am sure there are a large number of C++/CLI programmers in a similar position, and intellisense is a really useful aid for API discovery (now that MSDN help is totally broken!). As someone commented earlier, it does actually work about 70% of the time in VS2008, and while its aggravating when it doesn't (lots of ctrl+shift+spacebar bashing!), it can be very useful. Some of the functionality available to C# users looks very useful too.

I know that after saying for years that C++/CLI was a first class .NET language, you now seem to be giving it less and less support, but please reconsider the decision to not support C++/CLI in intellisense. Some of us believed you and invested time and effort learning it - and acutally quite like it.

Friday, May 29, 2009 4:56 AM by SvenC

# re: Rebuilding Intellisense

My guess is that this is a priority issue. You cannot do everything in one shot when you have a release schedule.

This reminds me so much of the "edit and continue" debugging which was introduced to VB.Net first and not C#. Big uproar and one version later C# got it as well.

So I expect intellisense for C++/CLI to pop up in the next version of the product or with a bit of luck with an SP.

@Ian: how is MSDN now totally broken? We do not have the new MSDN version in the beta so nobody can tell how it will be.

Besides the deterministic destructors, what else makes C++/CLI preferable? Under the hoods it is just using IDisposable. So just use using in C# and you have the same thing. C++/CLI cannot change the rules of the CLR which does not have deterministic destructors (which I find bad as well but that does not make C++/CLI preferrable).

But even if C++/CLI is just for building the glue between native and managed code, intellisense is definitely a state of the art feature, so I expect Microsoft to add it back to the new intellisense architecture.

Friday, May 29, 2009 5:57 AM by Ian

# re: Rebuilding Intellisense

SvenC,

Agreed, we may well get intellisense in later versions if we make enough noise. I guess we'll wait until then. Regarding MSDN help, I was referring to the current version. There are frequently times when the context of an api function seems to be ignored, and I get a page showing something in a totally different api which happens to have the same name. Maybe this is something the browse/intellisense database improvements may help with (if we get them). Search is next to useless. I tend to use the 'point google at msdn.microsoft.com' trick instead, but I understand this is something that Microsoft are working on.

Regarding C++/CLI features, I guess I mainly prefer it because I come from a C++ background, and the syntax is the same or very familiar. As far as I can see, doing C++ interop - which is most of what we do since we are migrating large portions of existing applications - is much more natural and easy in C++/CLI. There are a few other things, like firing events and separation of interface and implementation (.h and .cpp files) that seem to be a bit nicer in C++/CLI, but I am open to correction as my knowledge of C# is not that thorough. I guess the interface/implementation thing could be done with an interface class and a derived implementation.

Before I go too much further off topic, I just want to make the point that there are at least some developers making serious use of C++/CLI and these should not be forgotten.

Friday, May 29, 2009 11:38 AM by Abomination

# re: Rebuilding Intellisense

Intellisense is an ABOMINATION in native c++.

No refactoring for native c++.

It just goes on and on.

I get software through msdnaa. I can tell you that if I had to pay for microsoft development products I would be a really unhappy customer.

Friday, May 29, 2009 11:58 AM by Greg

# VS features roadmap for C++

Is there a guess as to a feature roadmap for C++ development under VS2010 and the next version?

Please have at least basic versions of the same features for the different VS languages (C++, C#, VB.NET).  Directing users to a free third party add in (e.g., VB refacotring) does not help in that the add in is a) not as good as MS developed, b) is not as well documented as MS developed and c) is not supported as well as MS developed.

- Refactoring should not be left out of C++

Please focus, much like the focus on code security in early 2001, on improving the core features of VS and the languages.  Adding in a new technology every 2 years does not help if that new technology is im a zombie state with no forward movement after the first version.

VS should provide the same generic features for all supported languages with each release.  It currently appears to be a wrapper around mutliple silo'ed and incosistant products (c++, C#, VB.NET).

This is the general frustration with VS since VS 6.

Friday, May 29, 2009 1:01 PM by small_mountain

# re: Rebuilding Intellisense

Ian/Sven,

I don't see anything in Boris's reply to Sunil suggesting that they just didn't have time to get C++/CLI IntelliSense in for VC10, and that it would be included in a later release.  If that's what Boris meant, I'd love to see a clarification so I could calm down ;-).

Ian, your point about C++/CLI being the natural way to extend native C++ projects into managed code is dead on.  Why would you take the time to figure out a way to do it with C# when, aside from Microsoft now treating C++/CLI as a red-headed step-child, there is clear upside to C++/CLI and clear downside to constantly writing plumbing code to marshal things over to C# and back?

Eric

Friday, May 29, 2009 1:27 PM by Cygnus X-1

# re: Rebuilding Intellisense

small_mountain,

There can be only one reason:  politics.

I worked at a place that had a product with a fairly large C++/MFC codebase.  In less than a day, I had it compiled with /clr and in less than two days it was a fully functioning web services client using .Net web service assemblies - and I didn't have to wrap my brain around some new-fangled syntax.  That kind of scenario should be trumpted by Microsoft, but all they seem to care about lately is trendy script-like and/or RAD languages.

Friday, May 29, 2009 3:02 PM by Boris Jabes [MSFT]

# re: Rebuilding Intellisense

First of all, thanks for all the comments. We appreciate hearing passionate feedback.

Second, I'd like to apologize for giving the impression that we don't care about C++/CLI and the power it provides. As the team that invented the technology, we are firm believer that it's one of the best ways to interact with managed code (whether it's to expose native objects or consume managed ones).

Third, I want to emphasize that we reduced support for C++/CLI only due to time and resource constraints. This is NOT an indication that we are distancing ourselves from the technology. We made sure that our "tag" parser and database fully understand C++/CLI constructs. This means you can see managed classes in Class View, search for symbols, get definitions/declarations and that the Winforms designer and Unit Testing functionality continues to work. Unfortunately, it would have taken a long time to add full support for C++/CLI semantics to the EDG parser and we wanted to get this into the hands of native developers in the meantime. We are sorry we couldn't do it all in one release and we intend to bring this support into the Intellisense engine. This is not a promise that it will show up in SP1, I simply can't make guarantees but I assure you this is not a scenario we intended to kill.

Fourth, one of the great things we support in this release is targeting an older runtime and tools. Thus if you install VS 2008 side-by-side, you can use VS 2010 to target that compiler and enable a better mixed environment.

Now, I'll attempt to reply to each individual comment:

Sunil - your 2 scenarios are exactly the ones where we recommend C++/CLI.

QbProg - I understand that this might be an adoption blocker for you. As SvenC noted, we simply couldn't do it all in one shot. We still believe in the language and I did not want to imply that Intellisense is unnecessary. As the person in charge of the Intellisense experience, I'm a big believer that it can help developers be more productive. We hope the loss of productivity will be temporary.

small_mountain - I hope my comment helps alleviate things a little but the bottom line is that your developer productivity working with C++/CLI in VS 2010 will be reduced. All I can say is that we are sorry and the work-around in the meantime will be to work with VS 2008 which can run side-by-side

Mohamed - The designer should work. Try the beta and log bugs if it's not working :)

Zachary - We don't think of C++/CLI as a second class language. We simply had to make a priortization decision and we knew pure native code was the dominant choice. We plan on equalizing the field after the release.

Ricardo - We are looking into a service pack solution but can't commit to anything yet

Que - I can't speak to Visual Assist's plans but I think your guess is probably correct

Ian - I hope I made it clear that we want to support C++/CLI and are not abandoning it. We simply couldn't fit it into the VS 2010 schedule

SvenC - You took the words out of my keyboard :)

Friday, May 29, 2009 3:16 PM by Sunil Joshi

# re: Rebuilding Intellisense

Boris,

Thanks for your considered reply.

That's exactly the kind of response I wanted to hear

I only wish you had more time and resources....

Friday, May 29, 2009 7:02 PM by Qtqw

# re: Rebuilding Intellisense

C++/CLI Intellisense is not such a huge issue as the issue of .NET clobbering the RAM and CPU as it adopts more and more .NET and WPF.. It is getting beyond a joke and perhaps someone over there needs to start testing on someting other than customised 32 core machines.

And we all know very well, no .NET apps are coming out from MSFT and the devs are going to pay again? As test bunnies for WPF 4.0? I'd sack that entire bloatware stack and have something like MILCore and Direct2D on XP replacing WinForms SOFTWARE GDI+.

I'd do it right NOW as it makes a LOT of engineering and customer sense than tacking bloat and bloat and doing some perf trick and overpromising performance over something that scales so lousy in WinForms and even worse in supposedly hardware accelerated WPF.

You kill two stones at one time and no one over there seems to be registering the fact that MSFT has itself slowed down .NET apps by 500% in order for what? To sell Intel boxes?

Saturday, May 30, 2009 4:47 AM by Patrik

# re: Rebuilding Intellisense

Heh, I'm not a dotNet dev, but I have noticed all dotNet apps are slow which is why I stay away from it as if it were acidic.

Regardless, it is true - I did remark it a while before, but Visual Studio is becoming more and more slow and sluggish, to the point that in Visual Studio 10, it's unusable on my machine that any other IDE out there (you name one!) would work fine on.

So I second this suggestion if this trend is going to continue. Drop dotNet and do Native instead. The gods know you've put effort into there, as well. Perhaps it's time to create a new GUI library for Native or improve MFC so you can build Visual Studio on top of it, hm?

Saturday, May 30, 2009 12:22 PM by small_mountain

# re: Rebuilding Intellisense

Boris,

Thanks so much for the clarification.  See, I thought you seemed like a nice guy.  

We have been in contact with the Visual Assist folks (some of our devs already use it), and they have said that they plan to have Intellisense support for C++/CLI in their VS2010 version.  They are motivated to have the support by the fact they they are using some C++/CLI in the VAX product itself.  I'm sure VAX will provide a satisfactory bridge to whenever Microsoft is able to add the support.

I apologize for getting apoplectic back there.  My excuse is that some of us have sort of bet our jobs on what we see as the only feasible way to bring the light of WPF to the darkness of our MFC product.  That strategy (lots of C++/CLI, a little C#, even less XAML) often leaves us feeling alone in the wilderness (when was the last time you saw a WPF blog post that said "and here's how you would do this in C++/CLI!"?).  When we get a whiff of Microsoft seeming less than committed to the underpinnings of that strategy, we get a little, shall we say, panicky.

Peace out,

Eric

Saturday, May 30, 2009 4:42 PM by Troy

# re: Rebuilding Intellisense

>>Probably by 2016 you'll need to have a SLI setup and octocore processors to be able to work in Visual Studio :)

Thanks for making me spit my coffee :P

Cygnus X-1: I am a C++ Win32 Dev, and yes, C# is the great language everyone think it is

Here are my gripes with B1:

*I would have liked a *lot* more refactoring options in C++ which seem to be non existent in Beta1

*it would have been nice if the front-end parser could understand and report erroneous parameter substitution (simple functions like printf())

*The whole IDE sloooooooooooow

*It crashes quite often.

On another note, a question to Boris Jabes:

Are the intellisence info populated by the front-end parser in the database accessible to 3rd parties? so one can write a refactoring kind of tool using this meta data, and wouldn't have to write a parser from scratch.

Monday, June 01, 2009 4:17 AM by tony

# re: Rebuilding Intellisense

I wish you improve native C++ syntax highlighting. I think that only 1% of users use C++/CLI.

Monday, June 01, 2009 10:01 AM by Cygnus X-1

# re: Rebuilding Intellisense

Boris,

#1) when you said "SvenC - You took the words out of my keyboard :)", I hope you weren't referring to his comments about C++/CLI not reallying having deterministic destructors.  If you think my beef is that memory isn't released in the destructor, then you just don't understand the issue.  There are many types of resources that get released in destructors and if you can't guarantee when those resources are released, then you eliminate a whole host of programming techniques.

#2) It doesn't make sense to me to target native C++ in this release and yet neglect C++/CLI which is the next logical step for C++ to go into .Net.  What does make sense to me is that this is really some interim release intended to placate developers who are seriously considering abandoning Microsoft developer tools.

#3) Yes, you (Microsoft) do think of C++/CLI as a "second class language" as has been said elsewhere and as has been proven by years of neglect for C++/CLI.  I don't think you had a choice, though, when a bunch of your C++ people left.  I just wish we knew what kind of political shenanigans went on.

And Troy, I didn't realize that you think C# is the great language everyone thinks it is.  You don't even have to say why, just knowing that you think so is good enough for me!

Monday, June 01, 2009 11:22 AM by Some one

# re: Rebuilding Intellisense

Hi anonymous coward,

That's what I say,there are two group people in MS,one write VC6,and the other make VS7,and today, they released VS2010B1.

Obviously,the group make VC6 has left MS.

Monday, June 01, 2009 3:40 PM by Cygnus X-1

# re: Rebuilding Intellisense

Hey dude, if you're referring to me as an "anonymous coward" because I dont' use my actual identity on this blog site, then you need to get a clue.

If it's because you think I'm an ex-Microsoftie with an ax to grind or you're one yourself, then that's hilarious because it means I've struck a nerve just by observing things from the outside.

If it's for some other reason, then, well...  get a clue.

Monday, June 01, 2009 4:22 PM by Another one

# re: Rebuilding Intellisense

I don't think C++/CLI is being deprecated as currently there's no alternative when it comes to hardcore interop, not even for MS to develop their own products (Office, etc.). I do think, though, that MS will eventually drop support for IDE features that add little value to interop scenarios. That's at least the direction it's moving.

All I will say is that Intellisense support for C++/CLI is important to me, so please count my vote.

Monday, June 01, 2009 5:35 PM by Cygnus X-1

# re: Rebuilding Intellisense

But why doesn't it seem to matter that C++/CLI is the only language that DOES IT ALL?!  No having to remember a whole new syntax.  No having to put up with script language quirks.  No "gotchas" because you forgot some language pitfalls.

And before anyone tells me the stale line "use the right tool for the job", spare me.  A programming language is more analogous to a tool *chest*, not a single tool.

Tuesday, June 02, 2009 10:21 AM by Another one

# re: Rebuilding Intellisense

> But why doesn't it seem to matter that C++/CLI is the only language that DOES IT ALL?!

Sure it does matter, but I also understand that even MS has limited resources so they have to establish priorities. The interop scenarios are clearly MS today's priority (i.e. writing class libraries plenty of unmanaged stuff to be consumed from C#/VB code).

Taking the above into consideration, until very recently I believed MS words that C++/CLI is not a second-class language, etc. However, the Intellisense move seems very bizarre to me because it doesn't fit the strategy MS has been advertising until now. In fact, any language without Intellisense support *is* a second-class language.

Tuesday, June 02, 2009 1:47 PM by Ryan Molden

# re: Rebuilding Intellisense

Troy:  Sorry your initial impression of the IDE is so poor for Beta1.  As a member of the shell team I am interested in hearing specifics.  You have said:

"*The whole IDE sloooooooooooow".  There is a very deliberate performance push at the moment where we are inspecting various scenarios and tackling perf problems.  That said it is always possible your specific scenario is not being covered, please do elaborate on the slowness you are seeing and I will do everything in my power to ensure it is being investigated.

"*It crashes quite often."  I do hope you are reporting these crashes (either via Watson or the Connect site).  As with all Betas there are likely bugs, we have fixed a large number of issues since release and of course are actively pursuing more every day, though we can't take action on unreported, unknown issues.

Do feel free to contact me directly (this goes for anyone posting here).  My work address is the first letter of my first name + my last name at microsoft.com.  We really do care about your feedback and are interested in your impressions/complains/rants.

Tuesday, June 02, 2009 2:42 PM by QbProg

# re: Rebuilding Intellisense

About the IDE slowness, I can confirm that it is slow!

The first thing that comes to eyes are the menus! They are totally unresponsive, even with a good graphic card.

Also, every UI operation is slower than VS 2008, also the startup time! Compilation seems a bit faster , or at least has the same performance of the previous version.

Tuesday, June 02, 2009 3:04 PM by Ryan Molden

# re: Rebuilding Intellisense

QBProg:  Thanks for the feedback, for it to be actionable I need to ask a few questions.

Menus are totally unresponsive?  How so?  Unresponsive to me indicates they don't work at all, but I assume you simply mean 'slow to respond'.  Is this only the very first time you drop the menu or everytime?  Is it any particular menu or all of them?

Every UI operation is slower.  Specifically?  Docking/undocking windows?  Interacting with the editor?  Other?  Are you running locally or through Remote Desktop?

Startup time:  We are actively investigating startup time regressions.

Tuesday, June 02, 2009 4:28 PM by Steven Toscano [MSFT]

# re: Rebuilding Intellisense

I just wanted to add, for those folks that are saying that C++/CLI is deprecated, that we are using the language in our own codebase.  The core editor components for VC are written in C++/CLI.  We made this choice mainly because of flexibility and performance.  With the new editor model being more data driven C++/CLI was an ideal choice for exposing token information to the managed classification (colorization) APIs.

Tuesday, June 02, 2009 6:07 PM by SvenC

# re: Rebuilding Intellisense

@Cygnus X-1,

.Net has no concept of deterministic destructors. Objects live in a garbage collected heap. You cannot do anything in any language (that includes C++/CLI) that is not supported by the underlying common language runtime.

Because deterministic resource management is important all .Net languages added some language construct to allow reliable resource management. They all build around IDisposable. So you have to prepare your classes to support IDisposable. C++/CLI hides that when your ref classes have a destructor, and auto generates the necessary code. That is of course nice, as it means even less repetetive typing than the using blocks of C#.

Hope that clarifies what I mean when I say "C++/CLI has no real deterministic destructors"

Wednesday, June 03, 2009 7:48 AM by QbProg

# re: Rebuilding Intellisense

Ryan: maybe I have exagerated a bit with the "totally unresponsive" definition.

The menus are much less responsive: try to open the "File" menu and move the mouse over the main menu bar. You see that sub-menus open after a variable delay. This delay was 0 in VC2008. Also, when you click, for example, on the File->New-> , the submenu appears after some time, not immediatedly. This is really annoying.

Many times there's a delay when you activate  any tool window (i.e. solution explorer->class view or code definition->output window).

Opening a C++/H file has sometimes a 500/700ms delay.

Also, there's a generic "impression" that the IDE is less "snappier" that the previous one, I think it's a matter of ms of delay before each command executed. This is usually on the "first run" of a command, and it disappears when the command is executed many times consecutively.

I hope this is clear, sorry for my English :)

Good work!

QbProg

Wednesday, June 03, 2009 7:52 AM by QbProg

# re: Rebuilding Intellisense

Also, may I add that the caret is flashing in the source code C++ window when a text is typed (even at low speed)? This is really annoying too.

You see the previous caret prosition before the new inserted char , then the caret is updated.

:)

maybe this is not the appropriate place for such a feedback!

Wednesday, June 03, 2009 9:21 AM by Cygnus X-1

# re: Rebuilding Intellisense

So, let's sum up:  Microsoft has limited resources and so has decided to abandon new development for the one programming language they control that supports both native and .Net platforms, is familiar to most professional developers, and they use internally.  Instead they focus their resources on developing and maintaining a new, proprietary language as a competitor to overhyped java, is available only on .Net, and shares many redundancies with VB.

Uhhh....  Makes sense to me.

Wednesday, June 03, 2009 1:33 PM by Ryan Molden [MSFT]

# re: Rebuilding Intellisense

>Ryan: maybe I have exagerated a bit with the "totally unresponsive" definition.

No problem, I just want to make sure I understand the issue properly :)  I know every millisecond of regressed perf seems like ages :)

>The menus are much less responsive: try to open the "File" menu and move the mouse over the main menu bar. You see that sub-menus open after a variable delay. This delay was 0 in VC2008. Also, when you click, for example, on the File->New-> , the submenu appears after some time, not immediatedly. This is really annoying.

Menus are lazily popluated (there are a lot of menus on the main menubar, even though you generally only see a few at a time).  This means the first time they are popped up we have to generate all the children.  This can involve doing callbacks on the contributing packages to determine if the menu item is visible/enabled/checked/etc.  This can entail package load (which has variable cost based on the package).  Some packages do FAR too much stuff in their command's QueryStatus handlers, like creating entire toolwindows that aren't even visible.  This is known and I have filed bugs on all offenders I have seen as it makes the overall experience poor for the end user for no reason.  That said I am aware of 'firt pop penalty' on these menus and am very interested in finding out where the cost lies and finding ways to lower it.

>Many times there's a delay when you activate  any tool window (i.e. solution explorer->class view or code definition->output window).

I am unfamilar with this one.  Delay how so?  Before the window gets the 'active window' coloring?  Before you can actually interact with the window?  Are these fully visible windows or auto-hidden or background tabs?  We try to avoid creating the content of non-visible tabs until they first become visible.  This can cause a bit of a delay the first time they are shown, but the alternative would be to eagerly create them at startup...which would make overall startup much slower depending on how many 'hidden' windows we are creating and how complex their construction is (as an extensible system we have little control over the contents of toolwindows, if I want to contribute a toolwindow that does a Sleep(2000) during construction I can and the shell has no way to know or prevent it).

>Opening a C++/H file has sometimes a 500/700ms delay.

Interesting, I will forward this observation to some people on the C++ team and see if they have any info on it or if they are currently investigating it.  Thanks for the report.

>I think it's a matter of ms of delay before each command executed. This is usually on the "first run" of a command, and it disappears when the command is executed many times consecutively.

This is also likely due to delayed package loading.  If the package that contributes the command hasn't been loaded then the first time the command is executed we need to load it.  Package loading is expensive (by definition, which is why we try so hard to delay it to the last possible minute).  Though that is all just 'an excuse', we are certainly not looking to hide behind that and say "not our fault!" :)  Any command in particular?  I can always look if a given package is doing 'silly' things on load (like some QueryStatus handlers do).

>I hope this is clear, sorry for my English :)

No, this was all very clear, thank *you* for the feedback, keep it coming!  :)

Wednesday, June 03, 2009 5:15 PM by Andy Rich [MSFT]

# re: Rebuilding Intellisense

Cygnus X-1 (and others), some internal perspective may be helpful. =)

I'm a tester on the front-end compiler team, and have been since 2003 - I was around for the early days of testing "ref class" and "^", back in the dark days before the compiler had support for generics or C#-style block properties.

A huge amount of our current testing and test infrastructure and automation is built in C++/CLI; and so the decision to not support C++/CLI intellisense in VS2010 was very unpopular within our team as well.  We feel every day the pain caused by that missing support.

That said, I was present in meetings where the decision was discussed, and it was clear that there was simply too much to do.  We would not be able to provide a first-class C++/CLI intellisense experience, along with a brand-new native intellisense experience and a browsing/navigation database built from the ground up, not to mention integrating with a new shell/editor/project system, in time for the VS2010 product.  And so the team focused on what it could accomplish, on which pieces we felt delivered the highest value to the largest number of customers.

This team has a lot of testing and development code collateral invested in C++/CLI, so you can be assured that there are no plans to abandon that technology - it would be very costly to us to rewrite all that code!  Bringing back C++/CLI intellisense support (and then going further: extending that support beyond what VS2008 was able to do) is very important to all of us here.

(C++/CLI development has not been completely abandoned, either; we've had to make several fixes to the front-end compiler in order to properly target the 4.0 CLR for the VS2010 release, as well as several bugfixes for C++/CLI scenarios.)

Andy Rich,

Visual C++ QA

Wednesday, June 03, 2009 6:35 PM by adi hodos

# re: Rebuilding Intellisense

The syntax highlighting is messed up every time I start VS2010. Especially I have set the background to black but it's set back to white every time I start it up. I can provide you with the settings file that I'm using ( it was exported from vs2008 ).

Thursday, June 04, 2009 12:42 AM by Boris Jabes [MSFT]

# re: Rebuilding Intellisense

QbProg -

We fixed the caret flashing issue after Beta1.

Thursday, June 04, 2009 5:43 AM by Someone like CLI

# re: Rebuilding Intellisense

Andy: C++/CLI development has not been completely abandoned

So it is half abandoned...

Thursday, June 04, 2009 1:37 PM by Cygnus X-1

# re: Rebuilding Intellisense

SvenC, I just saw your response.

I think you're being a bit too pedantic.  We're all aware of the garbage collection that goes on and it doesn't really matter if the object "lives" on beyond it's scope.  It does matter, though, if it holds onto (expensive) resources beyond it's scope.  So, if a language requires "consumers" of objects to know that a particular object has expensive resources that should be freed ASAP (e.g. C#'s "using" directive), then that kind of defeats the purpose of encapsulation, doesn't it?

Thursday, June 04, 2009 3:15 PM by vcblog

# re: Rebuilding Intellisense

Hello adi hodos,

Would you mind opening a connect bug about the syntax highlighting issue?  

Thank you

Visual C++ Team

Friday, June 05, 2009 7:02 AM by QbProg

# re: Rebuilding Intellisense

Also, another issue. You are reparsing every time "all" the headers of the SDK + many other libs I use (e.g. boost) that never gets modified.

VAX , for example, uses a global cache for non-changing headers, like the SDK.

Do plan to provide such a (usefoul) functionality? For an average project intellisense parses 1200+ files every time I open it, only a small part of these is actually of the project.

Thanks!

Tuesday, June 09, 2009 1:47 AM by Interesting Times

# C++ IntelliSense in VS2010

There's a lot of buzz around about the new C++ Intellisense engine in Visual Studio 2010, so I've decided

Tuesday, June 09, 2009 8:55 AM by John

# re: Rebuilding Intellisense

I'd just like to add my two cents to the C++/CLI issue.  For me, it's a no brainer.  I have 25 Graphical User Interface applications that I have developed and maintain for my customer that are comprised of about 150,000 lines of code (not huge but not trivial either).  

All are written in pure C++/CLI.  Initially they started out in native code then when .Net arrived on the scene I converted them to Managed C++ then, with the advent of VS2005, I converted them to C++/CLI.  When STL was not available in VS2003, I dropped all use of it and instead used the containers that were availabe in Managed C++ and are now available in C++/CLI.  Now that STL is available, I see no need to use it.  C++/CLI  does everything I need to have done.

So, bottom line; if VS2010 doesn't support C++/CLI any better than VS2008, I'll pass on it and stick VS2008 with all its warts.

cheers

Friday, June 12, 2009 11:05 AM by Anna-Jayne Metcalfe

# re: Rebuilding Intellisense

When you re-implement part of a system, it is surely common sense that you achieve equivalent functionality in the new system prior to commiting to superseding the old one.

This is a such a fundamental and obvious concept that the failure to include intellisense support in VS2010 suggests that either your development process is flawed or the implementation of it is.

I hate to have to ask this question, but which is it, and what do you plan to change in your process to ensure such an omission does not happen again in future?

Friday, June 12, 2009 11:20 AM by SvenC

# re: Rebuilding Intellisense

@Anna-Jayne, do you really think that "the failure to include intellisense support in VS2010" correctly expresses reality? It is "only" missing in C++/CLI but working in any other language, which includes native C++ as well. So you want all VS devs to wait for a next release just because intellisense for C++/CLI is missing? I would not want that.

Friday, June 12, 2009 12:57 PM by CnevS

# re: Rebuilding Intellisense

Ryan:

Just read your comment about menus being lazily populated, delaying expensive operations until required, etc...

Was wondering if it'll be possible to include these behaviours as choices in the Options pane? Eg, Lazy-load/pre-load, etc. Personally, I'd rather wait a full extra minute for everything to load up, and not experience any slowness whatsoever, compared to a fast load up + occasionally slow down.

SvenC:

Regarding your comment "So you want all VS devs to wait for a next release just because intellisense for C++/CLI is missing?"... sorry, can't help but make a mental comparison with Vista: "We can't let our users wait just because there are some flaws left in the OS. We'll sell this one, fix the problem, and sell the fix"

Friday, June 12, 2009 4:28 PM by SvenC

# re: Rebuilding Intellisense

CnevS (c:

I agree that update pricing for VS (and I guess Vista to Win7 as well) is too high. We got 6 SPs for VS6 but only one for each VS since 2003. So a good portion of a new VS version can be counted as SP. To me it would sound fair to pay 30% for the direct successor version, 60% when jumping two versions ahead, otherwise full price. So with a new release every two to three years you end up with about 15% maintenance cost per year.

Monday, June 15, 2009 9:32 AM by Anna-Jayne metcalfe

# re: Rebuilding Intellisense

@CnevS

> So you want all VS devs to wait for a next release just because intellisense for C++/CLI is missing? I would not want that.

Not all all. What I'm suggesting is

that it looks rather like MS have overcommitted for new features in this version of Visual Studio, and have now been forced to (effectively) remove functionality in order to meet their ship date. Had that risk been forseen (and it really should - this is not a trivial change) they could easily have kept the previous implementation in place (on a project type by project type basis if necessary) until the new system was feature-equivalent.

This is just basic good practice when re-implementing or refactoring part of a complex system, really.

FWIW overcommitting to features and then having to cut back at the last minute in order to meet a release date is behaviour symptomatic of a non-optimal development process (the thoroughly discredited Waterfall process being the classic example). If MS were using a more up to date process in the Visual Studio team (as the MS CodePlex team are, for example), we would probably have seen far more frequent CTPs and Service Packs, of course...

Tuesday, June 16, 2009 8:11 PM by Ryan Molden [MSFT]

# re: Rebuilding Intellisense

>Ryan:

Just read your comment about menus being lazily populated, delaying expensive operations until required, etc...

Was wondering if it'll be possible to include these behaviours as choices in the Options pane? Eg, Lazy-load/pre-load, etc. Personally, I'd rather wait a full extra minute for everything to load up, and not experience any slowness whatsoever, compared to a fast load up + occasionally slow down.

It could certainly be done.  I can't say off the top of my head how expensive it would be, we could perhaps limit it to populating children only of the visible items (say on first idle).  I will take it into consideration (unfortunately it is far too late for Dev 10 :(  Most people are VERY nervous about moving things to startup as they view that as the most important path and don't want to purposefully slow it down, but I see your point about allowing it to be a user choice to pay that penalty on startup instead of before the first menu drop.  Though subsequent menu drops wouldn't be faster (it would just be that the first one was as fast as subsequent ones) since we still need to QueryStatus on command contributors to determine their state right before the menu is shown.  If VS had a push model for its command state updates that would be unecessary (and we would live in a beutiful world, but alas we don't).  Keep the suggestions coming, I am always open to hearing ideas around the command UI space in VS as I think we can do a LOT to improve it :)

Wednesday, June 17, 2009 2:49 AM by SvenC

# re: Rebuilding Intellisense

I vote for a little less lazy population in VS 11: during first idle time instead of first use.

Wednesday, June 17, 2009 3:33 AM by fowl

# re: Rebuilding Intellisense

I think lazy population is the way to go, but does it have to be done on the ui thread? Can't there just be a place holder and a little throbber or something that gets replaced with the menu items when they are ready?

Or are menus unable to be altered once opened/shown?

Monday, June 22, 2009 4:11 PM by Laplace

# re: Rebuilding Intellisense

The reality is that the more you follow Microsoft the more you lose time, a LOT of time.

We have been writing our own user interface to work on native win32 and couldn't care less of the garbage have steadily throw at naïve programmers who time and time again believe to outrageously disgusting marketting dept buzzwords like the "seamlessly" "totally integrated" "increase productivity".

Indeed the loss of productivity directly (and I strongly believe VOLUNTARILY) caused by Microsoft strategy (monopolise by embracing and destroying) is stupendous.

Microsoft does EVERYTHING it can to slow software development: I have followed them from the early DOS days where they would say to programmers to use uselessly slow routines for displays (yet themselves use different one, the exact one they said was "poor programming" but in fact gave them use advantage and permit them to take over the market), and now the uselessly slow interop routine do the same trick.

Stick with microsoft advice and you are bound to lose considerable time, considerable money and your product will always be slower than equivalent product written by microsoft because they always provide you with second rate routines for the few areas it REALLY counts (but you don't get to know this before you have spend months on a project and its too late).

Take the minimum you need, write your own routine, and contrary to what microsoft is brainwashing you, you will save HUGE amount of time and have a STUNNINGLY faster final product.

Monday, June 22, 2009 4:21 PM by Laplace

# re: Rebuilding Intellisense

And I forget to add: the only reason CLI was created was to induce the C++ community to adopt it over a period of time until the code is more and more incompatible with C++ and the programmers can't turn back because of the time invested. Then they will abandon it and force everyone to use C#.

The only current resistance to microsoft total domination of software is C++. This is what permits competing os to currently survive. Take C++ it down, and they are doing quite well in this respect, and the battle is over.

Thursday, June 25, 2009 8:53 AM by Another one

# re: Rebuilding Intellisense

@Laplace:

I don't think that Microsoft does all that intentionally, but the result is pretty much the same :-). Anyway, seriously, most Microsoft technologies have great value (I bet you use Microsoft products, otherwise you would not be reading this blog).

The reason why most of us are complaining/ranting here is that we work with Microsoft tools and would like them to help us being more productive and better satisfy our **Windows** customer base.

Friday, June 26, 2009 6:09 PM by Ryan Molden [MSFT]

# re: Rebuilding Intellisense

>I think lazy population is the way to go, but does it have to be done on the ui thread?

We are certainly looking into moving as much off the UI thread as possible (pretty much constantly but I think more pointedly beyond Dev10).  The one BIG problem we have right now is COM and thread affinity.  Almost ALL command contributors that get QueryStatus and Exec callbacks currently assume they will happen on the UI thread.  This can be important because if you are accessing UI (even your own) or services that are thread bound (to the thread they were created on, which is generally the UI thread) then not being on the UI thread when your callback is invoked can be a BIG DEAL :)  This isn't an unsolvable problem but it does make it MUCH more difficult than simply offloading all the work to a background thread, since it would be transitioning back to the UI thread so much it would probably be even slower due to the thread switching :(

Tuesday, June 30, 2009 10:26 AM by Anna-Jayne metcalfe

# re: Rebuilding Intellisense

> The one BIG problem we have right now is COM and thread affinity.  Almost ALL command contributors that get QueryStatus and Exec callbacks currently assume they will happen on the UI thread.

As an add-in author I'll throw my perspective on this into the discussion.

First of all, I don't see any real reason why QueryStatus() can't (in theory at least) be moved out of the UI thread. Exec() however is a different matter - it really MUST be in the UI thread as third party implementations of Exec() are very likely to access UI elements themselves. You really shouldn't have to thunk a call between threads in order to display an "About" box, after all...

As QueryStatus() is called frequently and Exec() only when a command is being executed this should achieve your aim.

HOWEVER, should you make any changes in this area this will break many (possibly even most) third party Visual Studio extensions. Hence, you will have to be VERY explicit about the changes and give sufficient support to add-in authors who will have to modify existing code (both managed and native) for compatibility with them.

One final thought. The behaviour of QueryStatus/Exec is closely analogous to that of the MFC OnUpdateCmdUI/OnCmd mechanism (which is probably where it came from originally), so before you make any changes in this area I would urge you to consider what the impact of making a comparable change to the behaviour of the MFC OnUpdateCmdUI mechanism woul have, and how you would go abou mitigating the risks that would involve.

Friday, July 10, 2009 9:02 PM by Kelly Hall

# re: Rebuilding Intellisense

Please please please let the new IntelliSense be available for VS2008 via a hot fix.  My employer won't upgrade IDE versions until an SP1 is available (because all initial releases are buggy, of course).

Our current workaround?  Disable IntelliSense and use Visual Assist instead.  C'mon, guys; I'm trying to convince our embedded C++ team that Visual Studio is prime time out of the box.  

Saturday, July 11, 2009 2:52 PM by Ryan Molden [MSFT]

# re: Rebuilding Intellisense

>First of all, I don't see any real reason why QueryStatus() can't (in theory at least) be moved out of the UI thread.

Correct, there is no hard and fast reason QS couldn't happen off the UI thread, though with our present approach to calling QueryStatus I am not sure if it would be much of a win.  We only do command update passes on idle and immediately before showing a piece of UI such as a menu dropdown.  Even if both of those were moved off the UI thread it would not increase performance of command UI, and in the later case would likely decrease it as the UI thread would have to 'wait' on the background thread before it could render the command UI in the proper state.

Apart from that there is, as you likely know, a large difference between what is theoretically possible and what is possible in actual practice.  The chasm is mainly there because there are lots and lots of QueryStatus handlers written to subtly rely on being on the UI thread (both if they fiddle around with UI elements OR if they are using thread bound COM objects (services)).  While we could just up and move our idle time work to a background thread I predict it would result in a HUGE amount of breakage due to QueryStatus assumptions being violated.

>HOWEVER, should you make any changes in this area this will break many (possibly even most) third party Visual Studio extensions. Hence, you will have to be VERY explicit about the changes and give sufficient support to add-in authors who will have to modify existing code (both managed and native) for compatibility with them.

Yes, I am well aware of the huge risk of breakage in mucking with this area :)  You can be assured we would not make any changes here that would affect you lightly or without much advance notice.

Ryan

Thursday, July 23, 2009 12:37 PM by Daniel Earwicker

# re: Rebuilding Intellisense

Suppose MS said, in response to the feedback here, "Sorry guys, you're right. We screwed up. It's okay, we're going to delay the release of VS2010 until we have C++/CLI intellisense support ready".

Would this stop the bitching?

In terms of their present tentative plans, this would effectively mean skipping the first version and only releasing the following service pack instead.

In other words, NOT ONE OF YOU WOULD BE MATERIALLY BETTER OFF.

And users who don't need C++/CLI intellisense would be worse off, waiting longer than necessary for features that were ready months before.

Anna-Jayne Metcalfe: "When you re-implement part of a system, it is surely common sense that you achieve equivalent functionality in the new system prior to commiting to superseding the old one."

Yes, if by "superseding" you mean "forcing existing customers to uninstall the old version" or something.

I doubt Microsoft is planning to hire death squads to visit 3rd party developers and force them to uninstall VS2008 at gun point.

Consequently if the first release of VS2010 doesn't meet my needs, I won't use it. (This is actually what I did in the past: I stuck with VC++6 until VS 2005 SP1).

I still get bug fixes and other tech support on the old version, should I need it (VS2008 SP1 seems just dandy anyway). Sometimes Microsoft totally withdraws this support for a previously released development product, but they give a lot of notice, to put it mildly. e.g. FoxPro, this was announced in 2007, giving a full EIGHT YEARS notice to move to different technology: http://support.microsoft.com/lifecycle/?p1=7992

(There have been cases where they were forced by legal action over Java to drop products faster than that, but there's not much they can do about that).

small_mountain: "not supporting Intellisense for C++/CLI is a huge slap in the face..."

Why do people use expressions like "huge slap in the face" to describe a situation like this? No one is being slapped anywhere, not even lightly.

Microsoft is standing nearby you, waving a hand, in an attempt to helpfully waft some cool air at you, but they are not in any way slapping you. You may, if you are strange, choose to position yourself so that you get slapped, but don't complain about it.

Friday, July 24, 2009 6:01 PM by Andrew Marshall

# re: Rebuilding Intellisense

Is this issue limited to Intellisense, or does it also affect debugging features?

The reason I ask is that while debugging a CLI/C++ project I am unable to view the contents of local variables.

Regards,

Andrew.

Wednesday, July 29, 2009 12:20 PM by vcblog

# re: Rebuilding Intellisense

Hi Andrew,

Debugging should work. Can you please log a bug through MS Connect (http://connect.microsoft.com/) and reply to this post with the number?

Thank you,

Visual C++ Team

New Comments to this post are disabled
 
Page view tracker