[SourceKit] Disable module system headers validation

in all SourceKit requests.
This validation may call many stat(2). Since we don't expect system files
are edited. Disable it for SourceKit requests. Even if they are edited,
manual builds can validates and updates them.

rdar://problem/58550697
This commit is contained in:
Rintaro Ishizaki
2020-01-14 13:06:57 -08:00
parent faf3be4e8a
commit 951b85359a
3 changed files with 7 additions and 5 deletions

View File

@@ -324,11 +324,6 @@ bool swift::ide::CompletionInstance::performOperation(
// source text. That breaks an invariant of syntax tree building.
Invocation.getLangOptions().BuildSyntaxTree = false;
// This validation may call stat(2) many times. Disable it to prevent
// performance regression.
Invocation.getSearchPathOptions().DisableModulesValidateSystemDependencies =
true;
// FIXME: ASTScopeLookup doesn't support code completion yet.
Invocation.disableASTScopeLookup();