Q:

how to share big data with detail view?

I'm writing a video player support subtitles, There are two Views, VideoView and PlayView, main code is like the following, I want to pass subtitles to PlayView,
but the program becomes very slow. If I load var titles in PlayView not expose it to VideoView the program works ok. Is the titles too large? which is about 100k.
struct VideoView: View {
    @ObservedObject var videoItem: VideoItem = VideoItem()
    @State var titles:[Title] = []
    var body: some View {
        ZStack{
            if videoItem.playerItem != nil {
                
                PlayerView(player: $videoItem.player,titles:$titles)
                    .frame(maxWidth: .infinity, maxHeight: .infinity)
            }
}
}

playview.swift
public struct PlayerView: NSViewRepresentable {
    
   
    @Binding var titles:[Title] = []
}

the following code works, but can't access titles in VideoView
playview.swift
public struct PlayerView: NSViewRepresentable {
    
   
   var titles:[Title] = []
   public init(subtitleFile:Binding<String>)
  {
   
    let subtitles = Subtitles(filePath: self.subtitleFile)
    self.titles = subtitles.titles!

   }
   }

A:

@Binding support any large big data, It is just an address , My problem is caused by my own algorithm is too slow, which searches a subtitle in an array by the time.

