-
Notifications
You must be signed in to change notification settings - Fork 14
LazyVStack content is rendered immediately, results in really bad performance #6
Copy link
Copy link
Open
Description
I'm trying to present a screen and render hundreds of items in a LazyVStack within a ScrollView.
When using ScrollView, the screen is presented right away, and I can begin scrolling.
When using LegacyScrollView, the screen takes 4 seconds before it is presented. Subsequent updates to the view are extremely laggy. This must mean that the subviews are all rendered instantly.
ScrollView(.vertical) {
// LegacyScrollView(.vertical, showsIndicators: true) { // <-- results in extreme lag
LazyVStack {
Section {
if model.recentFriends.count > 0 {
Text("all")
}
ForEach(Array(model.friends.enumerated()), id: \.element) { index, friend in
FriendListView(friend: friend, isLastPerson: index == model.friends.count)
}
}
}
.font(.crimsonPro(.medium, size: 15))
.foregroundStyle(.gray)
.padding()
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels