     }
 
     public func getTarget(_ targetName: String) -> Target? {
-        return targets.first { $0.name == targetName }
+        return targetsMap[targetName]
     }
 
     public func getConfig(_ configName: String) -> Config? {

    public var fileGroups: [String]
    public var configFiles: [String: String]
    public var include: [String] = []

    public init(
        basePath: Path,

        self.basePath = basePath
        self.name = name
        self.targets = targets
        self.targetsMap = Dictionary(uniqueKeysWithValues: self.targets.map { ($0.name, $0) })
        self.configs = configs
        self.settings = settings
        self.settingGroups = settingGroups
