Skip to content

Commit 9efdc63

Browse files
author
David Ungar
authored
Merge pull request #690 from davidungar/better-sorting-by-command-line-order
[Incremental] More efficient sorting
2 parents b41c85b + 537e063 commit 9efdc63

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Sources/SwiftDriver/IncrementalCompilation/FirstWaveComputer.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,10 @@ extension IncrementalCompilationState.FirstWaveComputer {
192192
return skippedInputs
193193
}
194194

195-
private func sortByCommandLineOrder(_ inputs: Set<TypedVirtualPath>) -> [TypedVirtualPath] {
196-
inputFiles.filter (inputs.contains)
195+
private func sortByCommandLineOrder(
196+
_ inputs: Set<TypedVirtualPath>
197+
) -> LazyFilterSequence<[TypedVirtualPath]> {
198+
inputFiles.lazy.filter(inputs.contains)
197199
}
198200

199201
/// Encapsulates information about an input the driver has determined has

0 commit comments

Comments
 (0)