Don't show idle status while loading compile_commands.json/project.

This commit is contained in:
Jacob Dufault 2017-12-18 21:36:48 -08:00
parent a7d1c6917f
commit b4e8f8dd4f

View File

@ -149,7 +149,18 @@ struct InitializeHandler : BaseMessageHandler<Ipc_InitializeRequest> {
MakeDirectoryRecursive(config->cacheDirectory +
EscapeFileName(config->projectRoot));
// Start indexer threads.
Timer time;
// Open up / load the project.
project->Load(config->extraClangArguments,
config->compilationDatabaseDirectory, project_path,
config->resourceDirectory);
time.ResetAndPrint("[perf] Loaded compilation entries (" +
std::to_string(project->entries.size()) + " files)");
// Start indexer threads. Start this after loading the project, as that
// may take a long time. Indexer threads will emit status/progress
// reports.
if (config->indexerCount == 0) {
// If the user has not specified how many indexers to run, try to
// guess an appropriate value. Default to 80% utilization.
@ -168,15 +179,6 @@ struct InitializeHandler : BaseMessageHandler<Ipc_InitializeRequest> {
});
}
Timer time;
// Open up / load the project.
project->Load(config->extraClangArguments,
config->compilationDatabaseDirectory, project_path,
config->resourceDirectory);
time.ResetAndPrint("[perf] Loaded compilation entries (" +
std::to_string(project->entries.size()) + " files)");
// Start scanning include directories before dispatching project
// files, because that takes a long time.
include_complete->Rescan();