Skip to content

Commit

Permalink
Run target source pattern matching in parallel (yonaskolb#1197)
Browse files Browse the repository at this point in the history
As this transform closure does not access anything outside of its
closure and does not mutate any singletons, then it seems to be safe
to run this mapping in parallel.
  • Loading branch information
alvarhansen committed Mar 31, 2022
1 parent 50aa8c5 commit 17e7b03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
- Fix Monterey macOS shell version, shell login flag for environments [#1167](https://github.com/yonaskolb/XcodeGen/issues/1167) @bimawa
- Fixed crash caused by a simultaneous write during a glob processing [#1177](https://github.com/yonaskolb/XcodeGen/issues/1177) @tr1ckyf0x

### Changed

- Run target source pattern matching in parallel [#1197](https://github.com/yonaskolb/XcodeGen/pull/1197) @alvarhansen

## 2.27.0

#### Added
Expand Down
2 changes: 1 addition & 1 deletion Sources/XcodeGenKit/SourceGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ class SourceGenerator {
let rootSourcePath = project.basePath + targetSource.path

return Set(
patterns.map { pattern in
patterns.parallelMap { pattern in
guard !pattern.isEmpty else { return [] }
return Glob(pattern: "\(rootSourcePath)/\(pattern)")
.map { Path($0) }
Expand Down

0 comments on commit 17e7b03

Please sign in to comment.