I can confirm that loading large projects is very slow.
Not here, but it might depend onthe place where your project file is located.
The ProjectDirTraverser is only called from inside CalculateTopLevelPath, and that should not happen so often.
Can you apply the following patch and start C::B with "-d" parameter, and have alook ath the "Code::Blocks Debug".
You should see how often the traverser is called and how long it needed.
You can also try what happens if the CodeCompletion-plugin is disabled.
diff --git a/src/sdk/cbproject.cpp b/src/sdk/cbproject.cpp
index c50a046..ec7d528 100644
--- a/src/sdk/cbproject.cpp
+++ b/src/sdk/cbproject.cpp
@@ -348,6 +348,7 @@ void cbProject::CalculateCommonTopLevelPath()
wxFileName base = GetBasePath() + sep;
Manager::Get()->GetLogManager()->DebugLog(_T("Project's base path: ") + base.GetFullPath());
+ int traverser_count = 0;
// this loop takes ~30ms for 1000 project files
// it's as fast as it can get, considered that it used to take ~1200ms ;)
// don't even bother making it faster - you can't :)
@@ -381,10 +382,13 @@ void cbProject::CalculateCommonTopLevelPath()
wxDir dir(tmpbaseF.GetPath());
if (dir.IsOpened())
{
+ Manager::Get()->GetLogManager()->DebugLogError(F(_("We call ProjectDirTraverser %d times"), ++traverser_count));
+ wxStopWatch sw;
ProjectDirTraverser traverser;
dir.Traverse(traverser, wxEmptyString, wxDIR_DIRS | wxDIR_FILES);
if (traverser.IsValidPath())
base = tmpbaseF;
+ Manager::Get()->GetLogManager()->DebugLogError(F(_("traversing took %d ms"), (int)sw.Time()));
}
}
}