scrollTargetLayout + @FetchRequest causes items to constantly re-initialize

On a ScrollView+LazyVStack, the addition of .scrollTargetLayout causes many list items to be initialized, instead of the ordinary economical behavior of LazyVStack, where only the necessary items and views are initialized. Even worse, as the stack is scrolled down, all list items are reinitialized for every small scroll.

Without, .scrollTargetLayout, everything works fine.

I've tried every variation of locating modifiers, and different ways of identifying the list items, with no success.

Any ideas? Thanks.

    @FetchRequest(
        sortDescriptors: [NSSortDescriptor(keyPath: \Post.created, ascending: true)],
        animation: .default)
    private var posts: FetchedResults<Post>
    
    var body: some View {
        ZStack{
            ScrollView{
                LazyVStack(spacing:0) {
                    ForEach(posts, id: \.self) { post in
                        PostView(post: post)
                    }
                    .onDelete(perform: deletePosts)
                }.scrollTargetLayout()  //  <---- causes multiple Posts re-instantiations for any small scroll, very slow
            }
            .scrollPosition(id: $scrolledID)
            .scrollTargetBehavior(.paging)

So sorry, I really misunderstood something. The objects are not being reinitialized. It's just that scrollTargetLayout() with this configuration causes a tremendous amount of re-rendering.

My bad.

Still a problem though. It still makes scrolling unusably slow, even with a small data set.

scrollTargetLayout + @FetchRequest causes items to constantly re-initialize
 
 
Q