Does anyone have any tips on how I can speed up type checking of something like the following:
func updatedProfile(
bio: String? = nil,
area: String? = nil,
email: String? = nil,
phone: String? = nil,
example1: [String]? = nil,
example2: [String]? = nil
) -> Profile.Update {
return Profile.Update(
personal: .init(
name: model.name,
bio: bio ?? model.bio,
dateOfBirth: model.dateOfBirth,
area: area ?? model.area,
email: email ?? model.email,
phone: phone ?? model.phone
),
example1: example1 ?? [],
example2: example2 ?? []
)
}
Using -Xfrontend -warn-long-function-bodies=300 -Xfrontend -warn-long-expression-type-checking=200
I'm seeing that this function alone is taking almost 2 full seconds just to type check. I like the utility of an API like this as it's very flexible - maybe there's just a small change I can make somewhere?