title: SwiftUI Performance Issues, UI Lagging in iOS 14.2
body: <p>I am working on an app in SwiftUI, prior to iOS 14.2 UI updates were smooth as butter, But from iOS 14.2, UI updates with a large amount of data or complex data seem to be very laggy (for example using the LazyVGrid or LazyHGrid with a medium amount of data for more than 20 elements in the pageTabView makes the UI updates too slow.</p>
  <p>Here is my code for GridView</p>
  <pre><code> var body: some View {
      
      ScrollView {
          VStack {
              LazyVGrid(columns: columns, spacing: 10.0) {
                  ForEach(self.favViewModel.favourites.indices, id: \.self) { fav in
                      createGridCellView(fav: fav)
                          .onLongPressGesture {
                          self.selectedItem = fav
                          self.hasSelectedDropDown = true
                      }
                          .alert(isPresented: self.$showDeleteAlert, content: { () -&gt; Alert in
                              Alert(title: Text(&quot;Are you sure you want to delete this?&quot;), message: Text(&quot;There is no undo&quot;), primaryButton: .destructive(Text(&quot;Delete&quot;)) {
                                  self.favViewModel.send(action: .deleteFavourite(item: selectedItem))
                              }, secondaryButton: .cancel())
                          })
                  }
              }
              
              Color.clear.padding(.bottom, 100)
          }
          
          
          .actionSheet(isPresented: self.$hasSelectedDropDown, content: { () -&gt; ActionSheet in
              ActionSheet(title: Text(&quot;Delete Favourite&quot;), buttons: [.destructive(Text(&quot;Delete&quot;), action: {
                  self.showDeleteAlert = true
              }),.cancel()])
          })
          
      }
      .padding(.top, 10.0)
      .padding(.bottom, 30.0)
      
  }
  </code></pre>
  <p>Grid Cell View</p>
  <pre><code>struct FavouriteGridCell: View {
  @Binding var name: String
  @State var icon: String
  var handler: () -&gt; Void
  
  
  
  func createTransparentCircle() -&gt; some View {
      Circle()
          .frame(width: 80, height: 80)
          .shadow(radius: 1.0)
          .foregroundColor(Color.clear)
          .background(BlurView(style: .light).cornerRadius(50.0).brightness(-0.1))
  }
  
  func createRectangleView() -&gt; some View {
      Rectangle()
          .fill(Color.white.opacity(0.3))
          .frame(height: 20.0)
          .cornerRadius(12.5)
  }
  
  var body: some View {
      VStack {
          ZStack {
              createTransparentCircle()
              Image(icon)
                  .resizable()
                  .aspectRatio(contentMode: .fit)
                  .frame(width: 50, height: 50)
              
          }.onTapGesture {
              handler()
          }
          
          Text(name)
              .font(Font.custom(Theme.Fonts.Asap_Semibold, size: 14.0))
              .foregroundColor(Color.white)
              .fontWeight(.bold)
              .frame(minWidth: 0,
                     maxWidth: .infinity,
                     minHeight: 0,
                     maxHeight: .infinity,
                     alignment: .center)
              .lineLimit(2)
          
          Color.clear.padding(.bottom, 10.0)
      }
  }
  </code></pre>
  <p>}</p>
  <p>Code for PageTabView</p>
  <pre><code>VStack {
                      
      TabView(selection: $currentPage){
      FavouriteGridView(favViewModel:       self.favouriteViewModel,soundsViewModel: self.soundsViewModel)
                                  .tag(0)
                              
                          }.tabViewStyle(PageTabViewStyle(indexDisplayMode: .never))
                      }
  </code></pre>
  <p>Does anyone experience the same issues?</p>
  <p>I am looking forward to your help. Thank You</p>