506ms to type-check one SwiftUI body. What threshold do you use before splitting a view?
I have -Xfrontend -warn-long-function-bodies=275 set in Other Swift Flags, and one of my views recently tripped it hard: the body came in at around 506ms. Compile times were getting annoying.
I did not rewrite anything. I just pulled pieces out of body into separate computed properties: the main content, the transition, and the sheet modifier. Same code, same behaviour, just moved out of body.
The warning went away.
What surprised me is that there was no single monster expression to blame. body was just long, and the type checker seems to struggle with the accumulation rather than with one specific line. What helped was extracting one piece at a time and rebuilding, instead of refactoring the whole view at once.
So now I am wondering about the threshold itself. 275 is just the first number I tried. Too low and you drown in warnings on a big project, too high and you only find out when builds are already painful.
What do you use, and did you land on it deliberately?