It seems shadows/blur/round-corner/text-rendering some or all of these things are making my SwiftUI animated view slow and crash (shadows for sure b/c removing all shadows eliminated crash and run much faster).
I want to use SwiftUI or Core Animation Instrument to see what's going on and find out which of those things are slow. So I need to conditionally add or remove various SwiftUI view modifiers to run with instruments. I'm manually commenting different sets of modifiers for now, it's tedious. I want to know if there is better way? Is dong custom compiler flag -DSHADOWS and in code:
#if SHADOWS .modifier(Emboss()) #endif
best way? Or is there better way?