reports icon indicating copy to clipboard operation
reports copied to clipboard

FB14157778: NavigationLink inside List results in terrible scroll stuttering

Open insidegui opened this issue 1 year ago • 0 comments

  • Date: 2024-07-01
  • Resolution: Open
  • Area: SwiftUI
  • OS: macOS 15 Beta 2
  • Type: Incorrect/Unexpected Behavior
  • Keywords: SwiftUI, List, NavigationLink

Description

When a SwiftUI List with a significant amount of items has a NavigationLink representing each one of the items, scrolling stutters.

Please see the attached video and sample project to understand the issue more clearly, but to sum it up, this works fine:

List(items) { item in
    Text(item.id)
}

This results in terrible stuttering with CPU usage pegged at 100%:

List(items) { item in
    NavigationLink(value: item) {
        Text(item.id)
    }
}

Files

https://github.com/feedback-assistant/reports/assets/67184/8c08c58f-2d31-424e-82fa-3225c23396d5

ListBug-SampleProject.zip

insidegui avatar Jul 01 '24 20:07 insidegui