SwiftUI ScrollView performance in macOS 15

There seems to be a performance issue when scrolling using the track pad with SwiftUI scroll views in macOS 15. This issue is NOT present in macOS 14.

When using the track pad the scrolling is not smooth, but "stutters". However scrolling using the scroll bars is very smooth. The "stuttering" is worse if the SwiftUI ScrollView is in the detail view of a NavigationSplitView.

The problem is not noticeable in scroll views with a small number views, but when the more views inside the scroll view, the more prominent the problem becomes.

I have a simple example app that illustrates the problem here (the example app is a simplification of my app Yammixer): https://github.com/danwaltin/SwiftUIScrollViewPerformance

When running this example app on macOS 14 (Sonoma) on an Intel i7 Mac book pro from 2019 the scrolling is "buttery smooth".

But on macOS 15 (Sequoia) on my Apple Silicon M1 Mac book pro the issue is very obvious.

When using Instruments I see that on macOS 15 "flame graph" shows that 85% of the execution time is in a "_hitTestForEvent" method. If the test app does not use NavigationSplitView about 70% of execution time is in the _hitTestForEvent method.

Is there anyone else who has run into this issue? Or am I doing anything wrong?

I have exactly the same issue. The "_hitTestForEvent" method only takes 38,3 %, but the "_routeMouseMovedEvent" has 55,8 % (I am using the Magic Mouse instead of the touch pad).

For me it seems to be a bug in SwiftUI.

@ugglaguggla : Do you experience the same behaviour in the Xcode Preview? I only have the issue when using the compiled version.

SwiftUI ScrollView performance in macOS 15
 
 
Q