Swift UI MapKit performance

iOS 17 SwiftUI and Mapkit performance

I am trying to stop redraws/renders, I have quite a large polyline rendering to my map and its completely static it doesn't change

I also have quite a few Annotations but want to draw only the annotations that are in view so I am setting up state with the current region with onMapCameraChange so I can then work out which annotations to show.

The problem is that as soon as my region state updates it is unnecessarily rerenders/redraws my polyline. Is there anyway to stop this in SwiftUI Mapit?

Swift UI MapKit performance
 
 
Q