Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Indexer Problem(Indexer can't work properly with large Header-Files )
Indexer Problem [message #1734527] Thu, 09 June 2016 07:37 Go to next message
Alexander Hugenroth is currently offline Alexander HugenrothFriend
Messages: 3
Registered: June 2016
Junior Member
Hi,
I am new in this forum, but i need a little help with the Indexer:

The problem is, that the Indexer takes very long, if there is a Header-File with several thousand lines. It seems that the Indexer put this one Header-File again and again to the memory to compare it. Setting the memory use to a larger one does not help.
If this one Header is deleted the Indexer is much faster.

My question is:
Is it posible to exclude only a few Header-Files from the Indexer?

Or is it possible to genearate a Stub-Header-File, wich can be used for the Indexer?
How can I include this Stubcode?

I am using Eclipse CDT version 8.6.0
Re: Indexer Problem [message #1734609 is a reply to message #1734527] Thu, 09 June 2016 20:46 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Have you looked at the Indexer option dialog (Window --> Preferences --> C/C++ Indexer) ?
There are a number of options including one to skip files beyond a certain size.
Not sure if that wouldn't imply a lot of squiggly red lines though.

You can also set the maximum database cache size. Try increasing it (I have mine set to 25% heap size with a maximum limit of 128 MB).

You could try disabling automatic updating of the Indexer all together and manually rebuild it as needed or perhaps update only on file saves. My manual rebuilds do take minutes to perform though but updating is fairly quick.

Have you seen the sizes of the files in the standard library? They are quite large too but never seem to cause noticeable slowdown.

If this is a file in your project maybe you can put it in another project and reference it like it was an installed library header.



Re: Indexer Problem [message #1734629 is a reply to message #1734609] Fri, 10 June 2016 06:38 Go to previous messageGo to next message
Alexander Hugenroth is currently offline Alexander HugenrothFriend
Messages: 3
Registered: June 2016
Junior Member
Hey,
thank you for your commit.

The File is not so big, just under one MB, but a several thousands times in Memory (the most of entries are defines), takes more than 500 MB of Space, so increasing maximum database cache is not possible.

The option to skip files large than a specified size only accepts integer, so files under one MB can't be skipped.

It is not a option to move the file to an other Project to link it.

Re: Indexer Problem [message #1734701 is a reply to message #1734629] Fri, 10 June 2016 12:26 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Well, you may be stuck then.

Two other things you can try:

1) Mark it as not belonging to the build. Right click on the file in project view select Resource Configurations there should be an option to exclude it from the build. This apparently applies to the Indexer, too. I have a directory within the project where I keep old and other code files for reference but I want CDT to ignore them. You can mark individual files as well as directories.

2) There's a preprocessor macro called __CDT_PARSER__ that is defined when the Indexer runs.. You may get away with surrounding the file content with #ifndef __CDT_PARSER__ ... #endif . The Indexer will still read the file but skipping over all the enclosed lines may speed it up.

Not really sure what effect skipping the file would have. You could end up with everything in the file being flagged when used.

Re: Indexer Problem [message #1734908 is a reply to message #1734701] Mon, 13 June 2016 15:41 Go to previous message
Alexander Hugenroth is currently offline Alexander HugenrothFriend
Messages: 3
Registered: June 2016
Junior Member
Okay,
I also tried that, but it don't helped. Sad
Previous Topic:COM port not found
Next Topic:How can I launch Eclipse from terminal on ubuntu?
Goto Forum:
  


Current Time: Thu Mar 28 08:03:28 GMT 2024

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

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

Back to the top