Skip to content
This repository was archived by the owner on Feb 26, 2026. It is now read-only.

Commit 4d69b8a

Browse files
committed
fix: improve performance of XcodeGraphMapper
1 parent 748916b commit 4d69b8a

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

Package.resolved

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/XcodeGraphMapper/Mappers/Project/PBXProjectMapper.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,15 @@ struct PBXProjectMapper: PBXProjectMapping {
4545

4646
// Map PBXTargets to domain Targets
4747
let targetMapper = PBXTargetMapper()
48-
let targets = try await pbxProject.targets.serialCompactMap {
49-
try await targetMapper.map(pbxTarget: $0, xcodeProj: xcodeProj)
48+
let targets = try await withThrowingTaskGroup(of: Void.self, returning: [Target].self) { taskGroup in
49+
var targets: [Target] = []
50+
for pbxTarget in pbxProject.targets {
51+
taskGroup.addTask {
52+
targets.append(try await targetMapper.map(pbxTarget: pbxTarget, xcodeProj: xcodeProj))
53+
}
54+
}
55+
try await taskGroup.waitForAll()
56+
return targets
5057
}
5158
.sorted()
5259

0 commit comments

Comments
 (0)