SwiftUI performance diagnosis
On a dashboard screen built in SwiftUI, the whole screen stutters on every character typed into a text field. What's your hypothesis for what's going on?
On a dashboard screen built in SwiftUI, the whole screen stutters on every character typed into a text field. What's your hypothesis for what's going on?
The hypothesis is that the input state lives in a large upstream view (or a single ObservableObject), so every keystroke re-evaluates the upstream body and all of its children, compounded by heavy computation inside body and unstable identity.
SwiftUIMultiple choiceExpert
In this SwiftUI plus Observation code, when only store.count is incremented, select all…
#performance #body #observable
SwiftUIShort answerAdvanced
In SwiftUI, what does the iOS 17 @Observable macro give you over the older…
#performance #observable
UIKitShort answerAdvanced
You get a report that scrolling stutters on a feed screen that mixes images and text…
#performance #instruments
SwiftUIShort answerIntro
A junior asks you why the screen doesn't update after they change a @State value in…
#observable