Community
Participate
Working Groups
Build Identifier: 20100617-1415 Today, when changing an active configuration, non of the relevant views is updated: Editor, Outline, Project Explorer. That's because the default indexer setting is set to bind all these views to a single build configuration - Debug. Users frequently complain about that and expect the views to update automatically like in other IDEs, e.g. Visual Studio. If my understanding is correct, current Indexer setting was selected to avoid performance problems with very large projects. Specifically when setting an indexer to bind to an active configuration, it does full re-indexing when configuration is switched and that can take a long time for very large projects. From user's POV, this is a pure implementation problem. Ideally, the solution should be fixing the indexer performance and changing the default setting. Meanwhile, I believe that very large projects are mainly makefile based and changing configurations is not an issue there. Therefore, any interested party for who huge managed projects are more an exception than normal, can use the indexer which is bound to active configuration such that all views update at configuration switch. I'll post a patch shortly. Reproducible: Always
Created attachment 182901 [details] Change the default workspace indexer setting Makes the indexer work based on active build configuration by default.
I am not sure what is the point of this patch. Obviously "the implementation problem" of "fixing the indexer performance" has to be resolved first.
(In reply to comment #2) > I am not sure what is the point of this patch. Obviously "the implementation > problem" of "fixing the indexer performance" has to be resolved first. I wasn't aware of https://bugs.eclipse.org/bugs/show_bug.cgi?id=183781, but in any case it should be applied after that bug is fixed. The immediate use of the patch is for audience that do not necessary deal with huge projects. So, instead of hiding a performance problem by introducing wrong system behavior, which is the current state, with this patch one would only notice a problem with very large projects and then workaround it by binding the indexer to some constant configuration.
Take a look at bug 172919 where the feature was implemented and decision about defaults was made. I agree with that. While arguable there are more users who want to link indexer to active build configuration, it is just an inconvenience (and admittedly confusion) of having hard to discover the option in preference. On the other hand such a default would make the switching unusable out of the box for those with big projects, and it applies not only to managed but to Standard Makefile projects as well.
*** Bug 213300 has been marked as a duplicate of this bug. ***
For what it's worth, I think the current default is extremely confusing to new users. For the reasons below, I believe changing it in the base CDT would benefit many more users than it hurts. Large projects, which take a long time to index, likely have an external build system, and likely use fewer configurations than managedbuild projects. This is because: - make targets aren't tied to configurations - scanner discovery is not configuration aware So the users of large projects gain little benefit (with stock CDT) in using multiple configurations. For users of managedbuild the opposite is true. Multiple configurations are frequently used (by default there are 2) and users almost instantly encounter this issue. As a result I believe if we change the default, and show code 'correctly', fewer users will be confused, and users with large projects will on the whole be unaffected. We should also make it easy for products to override the default in their customization.ini, and we can provide a FAQ entry for users of the stock CDT on how to stop the indexer from running when changing build configurations.
I agree that it is very confusing. I think we could reduce the confusion in UI, see suggestion in bug 313944. That should be easy enough to do.
To add to James point, the performance issue concerns only a certain percentage of users. The re-indexing triggered by configuration switch is visible in UI and the user has a clear understanding what's going on and a full control to modify indexer settings. On the other hand, in practice, it is not possible to deduct that the views show wrong data not because of a bug in CDT, but due to indexer setting, deep in the project properties. Since we're not in consensus, I think it's a good idea to make this setting customizable. Also, reducing confusion in UI is welcome.
*** Bug 331639 has been marked as a duplicate of this bug. ***
*** Bug 420796 has been marked as a duplicate of this bug. ***
*** Bug 465605 has been marked as a duplicate of this bug. ***
The default is just too confusing. I now think it's better to change the default to using the active config and let other people affected by slow indexing time modify the preference if necessary. (In reply to James Blackburn from comment #6) > Large projects, which take a long time to index, likely have an external > build system, and likely use fewer configurations than managedbuild > projects. This is because: > - make targets aren't tied to configurations > - scanner discovery is not configuration aware > So the users of large projects gain little benefit (with stock CDT) in using > multiple configurations. A lot of build systems heavily use configurations. My projects have hundreds of configs and are large. In any case, in those more advanced scenarios, I still think people can tweak preferences to only use a fixed config if that makes sense. In my case, even with a large project that takes forever to index, it still doesn't make sense to use a fixed config, as target platforms are quite different. Scanner discovery is also now configuration-aware, MBS through Language Settings Providers and I think also Core build.
New Gerrit change created: https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/170333
Gerrit change https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/170333 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=6ca0bb78bbd0724426c5ab320c1e144e6234dff9
*** Bug 313944 has been marked as a duplicate of this bug. ***
*** Bug 481090 has been marked as a duplicate of this bug. ***
I'm going to remove bug 183781 as a dependency. Having bug 183781 resolved would have made the decision to change the default easier but now that the default is changed, that bug is an independent performance improvement.