Post

Replies

Boosts

Views

Activity

Reply to swift-frontend memory usage
Same issue here. In my case this bug appeared while using .padding(.horizontal) and .font(.system(size:)) modifiers inside GeometryReader with dynamic values that are calculated based on the height of the GeometryProxy and additional values. I could resolve this problem for now as soon as I moved the concerning views (with their modifiers) out of the body property and instead used custom @ViewBuilder functions to create my views: @ViewBuilder func getDateText(in page: GeometryProxy) -> some View {     HStack {       Text(date.formatted(date: .abbreviated, time: .shortened))         .font(.system(size: (page.size.height * 1.11) * textFontSize))       Spacer()     }     .padding(.horizontal, page.size.width * 0.05) } Then inside body I called the @ViewBuilder functions like this: GeometryReader { page in getDateText(in: page) } I have not tested this workaround in other situations, but hope that this is helpful for someone else as well.
Nov ’21