Commits

Argyrios Kyrtzidis committed 17f7684a20d
[IDE/CodeCompletion] Make collecting and caching the global completion results more efficient. We already don't try to detect and filter out shadowed declarations due to performance reasons, so cache the visible declarations contained in a specific ImportedModule and collect all the results by recursing via calling Module::forAllVisibleModules(). This is more efficient because we avoid doing the work to collect all the global results for both Cocoa and AppKit, and we save on memory usage for the cache. This also fixes a correctness issue where if you imported a module that was transitively imported by a previous import (e.g. Cocoa and AppKit) you would get duplicate results. For this test case: ---------- import Cocoa import AppKit import Foundation func foo() { <ESC> } ---------- We go from - 7.05 secs to 1.43 secs to collect the results - 9.0 secs to 2.4 to ultimately show them in Xcode for first-time invocation. Swift SVN r18344