[IDE] Enable 'IgnoreSwiftSourceInfo' in code completion

Get source locations from '.swiftsourceinfo' is currently expensive.
Since they are not necessary for code completion, set
'IgnoreSwiftSourceInfo' to 'true'.

rdar://problem/57194358
https://bugs.swift.org/browse/SR-11767
This commit is contained in:
Rintaro Ishizaki
2019-11-15 15:45:47 +09:00
parent 2fbb0c1170
commit 815bf31bda
4 changed files with 24 additions and 0 deletions

View File

@@ -67,6 +67,10 @@ static bool swiftConformingMethodListImpl(
return false;
}
// Disable source location resolutions from .swiftsourceinfo file because
// they are somewhat heavy operations and are not needed for completions.
Invocation.getFrontendOptions().IgnoreSwiftSourceInfo = true;
Invocation.setCodeCompletionPoint(newBuffer.get(), Offset);
// Create a factory for code completion callbacks that will feed the