Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Handle large c projects with Indexer
Handle large c projects with Indexer [message #1756491] Fri, 17 March 2017 19:01 Go to next message
Pete Miller is currently offline Pete MillerFriend
Messages: 13
Registered: September 2012
Junior Member
Hi,
usually a developer wants to have all c and h files together in eclipse, even if he is working only on certain parts. During development c and h files are added or removed from project, but this will lead to indexing the complete project again, which takes always a lot of time (e.g. 1hour, progress 75%) . Sharing the eclipse workspace with pdom-file could be one solution, but do you see other workarounds here?
Thanks and have a great day.
Re: Handle large c projects with Indexer [message #1756505 is a reply to message #1756491] Sat, 18 March 2017 04:24 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Not sure what you mean by 'large'.
One of my biggest (dlib c++ library) has 758 header files and 628 c/c++ files.
Takes around 3 min to completely index.
You might try it yourself by temporarily downloading and indexing
https://sourceforge.net/projects/dclib/
If it takes longer than 5-10 min then something is definitely wrong.

Perhaps you've got some files that are difficult for the Indexer.

Adding or deleting files should normally update the index without a rebuild.
You may want to consider breaking up the code into one or more libraries each in a separate project.

You could try modifying the Indexer options.
I'm thinking the Indexing strategy and Cache limits
I believe these are the defaults;
index.php/fa/28791/0/

HTH

[Updated on: Sat, 18 March 2017 04:33]

Report message to a moderator

Re: Handle large c projects with Indexer [message #1756518 is a reply to message #1756491] Sat, 18 March 2017 21:08 Go to previous messageGo to next message
Pete Miller is currently offline Pete MillerFriend
Messages: 13
Registered: September 2012
Junior Member
I imported dclib as existing code and it took only 3minutes (Win7, Neon2) to index it. I'didn't configure all system includes etc...but this is a really good example. Thanks!

In my case I speak about large projects with cross compiler (no GCC) and complex external make files, which include switches to build the project (in command line) with different files, but with some identical variables and functions, which makes it more difficult. I tried to tweak the setting.ini, indexer (this helps a bit) or to exclude files.

Is there a good way to import such projects with existing makefiles and to use the Indexer?
Re: Handle large c projects with Indexer [message #1756522 is a reply to message #1756518] Sun, 19 March 2017 07:41 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
None that I know of.

Note that makefile generation and indexing are different things.
A Makefile project simply means you (vs. CDT) will build the makefile.
It has nothing to do with indexing per se.
The indexer really only needs the compiler to discover its builtin paths and macros.
You could put them into Eclipse by hand instead.

Without having your code it's difficult to make any recommendations.
A few in general,:
Make your projects as small as possible by separating the code into logical entities using symbolic inks to shared code.
When possible, make libraries of common code and have separate projects for each library.
When cross-compiling avoid networking as much as possible.
Look at how GCC implements its libraries which essentially uses multiple switches (via preprocessor defines) to implement various compile configurations.

Previous Topic:Creating a project using Jam builder
Next Topic:lost patience with visual studio integration [denglish]
Goto Forum:
  


Current Time: Sat Apr 20 00:56:34 GMT 2024

Powered by FUDForum. Page generated in 0.02901 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top