Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
CC upper limits ? BUT for sure BUGs
killerbot:
Are there any upper limits for CC (parsing ?) related to :
- number of projects in workspace
- number of files
- number of tokens identified
I have noticed this for a very long time (1 year + ?), when I load a workspace, which contains +- 100 projects (maybe even more), the CC works very bad. It can't find declarations, implementations, even when the stuff is within the same (active) project, when looking at the log of the parsing, I notice it for sure does not parse all projects.
So lot of frustration with the users :-(
ollydbg:
--- Quote from: killerbot on January 22, 2014, 06:38:25 pm ---Are there any upper limits for CC (parsing ?) related to :
- number of projects in workspace
--- End quote ---
There is a limit for project numbers if you are in "One Parser per Project" case. I don't think there is a limit for the "One Parser for the whole Workspace" case.
--- Code: ---- number of files
- number of tokens identified
--- End code ---
No.
killerbot:
did some experiment, I noticed already in the past the parsing (in the CB log tab) stopped at the same project in the workspace, it is not due to the fact it is a given Nth project, sicne other projects have been added to the workspace in front of the project where the parsing stopped upon.
First description of the workspace.
- one parser per workspace
- it contains 477 projects
- the log shows the pairs of AddProjectToParser/OnParserEnd, it show 76 pairs and then it ends with AddProjectToParser on the problematic project "FOO"
One thing to note about project FOO : it is a library project with only headers, so when building this project there's nothing to do.
Made this project FOO the active project in the workspace, that means it would become the first project to be parsed, the one which triggers the CreaterParser.
This does make a difference !!!
It is parsed and more projects (starting from the first one in the workspace are being added/parsed).
The results are better, but still extremely bad. Now 228 projects made it through the parsing step. Again it halts on project "BAR".
Special thing about this project "BAR" : it is a library project with only headers.
For further tests I made a workspace with 4 projects, one of them being "FOO" (it was the second one, and the first project being the active), in this case all did get parsed ...
EDIT : an 11 projects workspace containing FOO and BAR, all parsed ...
ollydbg:
Is it happens when there are some editor opened when you load the workspace?
What happens if you have *NO* editors opened when you load the workspace?
Please test and report back, I suspect that the opened editor cause this issue.
Also, when in one parser for whole workspace mode, the project files will be parsed one another. But the next project will only be triggered if the previous project parsing send an "OnParserEnd" event.
Another guess is that if one Foo project contains some files, but those files were already be parsed before, then in-fact, there is no actual Parserthread tasks assigned to the threadedtask-pool, then, there will be no parser-end event, because the parser-end event were initially sent from the threaded task pool that all tasks were done.
EDIT: If possible, can you post the debug log messages? Thanks.
ollydbg:
@Morten
I see a comment by you in the source code:
--- Code: ---void NativeParser::OnParsingOneByOneTimer(cb_unused wxTimerEvent& event)
{
TRACE(_T("NativeParser::OnParsingOneByOneTimer(): Enter"));
std::pair<cbProject*, ParserBase*> info = GetParserInfoByCurrentEditor();
if (m_ParserPerWorkspace)
{
// If there is no parser and an active editor file can be obtained, parse the file according the active project
if (!info.second && Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor())
{
// NOTE (Morten#1#): Shouldn't this actually be a temp parser??? I think this screws things with re-opening files on load of a projects...
AddProjectToParser(info.first);
CCLogger::Get()->DebugLog(_T("NativeParser::OnParsingOneByOneTimer(): Add foreign active editor to current active project's parser."));
}
// Otherwise, there is a parser already present
else
{
// First: try to parse the active project (if any)
cbProject* activeProject = Manager::Get()->GetProjectManager()->GetActiveProject();
if (m_ParsedProjects.find(activeProject) == m_ParsedProjects.end())
{
AddProjectToParser(activeProject);
CCLogger::Get()->DebugLog(_T("NativeParser::OnParsingOneByOneTimer(): Add new (un-parsed) active project to parser."));
}
// Else: add remaining projects one-by-one (if any)
else
{
ProjectsArray* projs = Manager::Get()->GetProjectManager()->GetProjects();
for (size_t i = 0; i < projs->GetCount(); ++i)
{
// Only add, if the project is not already parsed
if (m_ParsedProjects.find(projs->Item(i)) == m_ParsedProjects.end())
{
AddProjectToParser(projs->Item(i));
CCLogger::Get()->DebugLog(_T("NativeParser::OnParsingOneByOneTimer(): Add additional (next) project to parser."));
break;
}
}
}
}
}
else if (info.first && !info.second)
{
info.second = CreateParser(info.first);
if (info.second && info.second != m_Parser)
{
CCLogger::Get()->DebugLog(_T("NativeParser::OnParsingOneByOneTimer(): Start switch from OnParsingOneByOneTimer"));
SwitchParser(info.first, info.second); // Calls SetParser() which also calls UpdateClassBrowserView()
}
}
TRACE(_T("NativeParser::OnParsingOneByOneTimer(): Leave"));
}
--- End code ---
Here
--- Code: ---// NOTE (Morten#1#): Shouldn't this actually be a temp parser??? I think this screws things with re-opening files on load of a projects...
--- End code ---
I agree on this, why do we need to check the editor on the OnParsingOneByOneTimer event? This is basically to parse the project sequentially in one parser for whole workspace mode.
Navigation
[0] Message Index
[#] Next page
Go to full version