Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 284318

Summary: Problem with fast indexing on a very big projects
Product: [Tools] CDT Reporter: Yevgeny Shifrin <yevshif>
Component: cdt-indexerAssignee: Project Inbox <cdt-indexer-inbox>
Status: RESOLVED INVALID QA Contact: Markus Schorn <mschorn.eclipse>
Severity: major    
Priority: P3 CC: Lee.Machnay
Version: 6.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Yevgeny Shifrin CLA 2009-07-22 14:22:51 EDT
Hi,

I am working on a very big C++ project (~30k files). A few weeks ago I opened a bug regarding performance problem with full indexer in CDT 6.0 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=282510). Markus Schorn suggested to use fast indexing instead (as full indexer is not better than fast indexing). Currently we are experiencing some problems with fast indexing which are not observed in full indexer. On some methods sometimes Call Hierarchy does not work, after "choosing the file" -> "Index" -> "Freshen All Files" the problem is solved. This behavior is observed in the following scenario, unfortunately I was not able to reproduce it on a small test program.

**************************************************
/*
 * MyClass.h
 *
 *  Created on: Jul 22, 2009
 *      Author: yevgenys
 */
#ifndef MYCLASS_H_
#define MYCLASS_H_

#include <boost/utility.hpp>

class MyClass {
public:
    MyClass();
    virtual ~MyClass();
    
private:
    class Internal;
    
    std::auto_ptr<Internal> _internal;
};

#endif /* MYCLASS_H_ */

**************************************************

/*
 * MyClass.cpp
 *
 *  Created on: Jul 22, 2009
 *      Author: yevgenys
 */

#include "MyClass.h"

class MyClass::Internal
{
public:
    Internal(){};
};

MyClass::MyClass() 
{
    _internal.reset( new Internal() );
}

MyClass::~MyClass() 
{}

int main()
{
    return 0;
}

*****************************************************

The problem observed if Call Hierarchy is activated on Internal constructor. As I wrote above, I was not able to reproduce it on this small test application. This problem is really annoying, as I cannot be sure whether Call Hierarchy works or some files need to be freshened. I would appreciate you support on this.

Best regards,
Yevgeny
Comment 1 Yevgeny Shifrin CLA 2009-07-23 01:51:27 EDT
Hi,

I made the following test trying to find what could cause this issue:
* In specific file which has this problem I did "choosing the file" -> "Index" -> "Create Parser Log". 
* I made "Freshen All Files" on this file which solved Call Hierarchy problem.
* I activated "Create Parser Log" on this file again (after the Call Hierarchy problem solved).
* I compared two created log files hoping to see some difference which could give a clue of what causes this problem. Unfortunately the files were identical except one line "__TIME__="..."

There is one configuration difference between the full indexed project and fast indexed project. Fast indexed project has default configuration in context of "Cache limits". In the full indexer project I changed it to:
* Limit relative to heap size (Index database cache): 20%
* Absolute Limit (Index database cache): 1024 MB
* Absolute Limit (Header file cache ...) : 1024 MB

Maybe default configuration is not enough for big project (~30k).

Thanks,
Yevgeny
Comment 2 Markus Schorn CLA 2009-07-23 03:01:03 EDT
As you write the example works fine. 
Comment 3 Yevgeny Shifrin CLA 2009-07-23 04:06:21 EDT
Hi Markus,

As I wrote I could not reproduce it on small testcase. But the problem does exist in many cases, on all CDT 6 Eclipse installations. Could this be related to cache configuration differences? I would appreciate any suggestions from your side.

Thanks,
Yevgeny 
Comment 4 Markus Schorn CLA 2009-07-23 05:37:28 EDT
(In reply to comment #3)
You can either debug the problem yourself or make it reproducable (for others). Until then the bug report is useless. 
Comment 5 Markus Schorn CLA 2009-07-23 06:04:47 EDT
(In reply to comment #3)
> .... Could this be related
> to cache configuration differences? I would appreciate any suggestions from
> your side.
The cache only affects the performance.
Comment 6 Yevgeny Shifrin CLA 2014-04-09 07:09:31 EDT
Hi,

Since I opened this bug, I am working in other company developing in C. The code is much smaller few K files and I still see that after index "rebuild" there many issues that are solved after I invoke "freshen all" files.

This issue also was mentioned in http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg25301.html.

Thanks,
Yevgeny