title: CADisplayLink stutters when built from archive
body: <p>I have project that is rendering video playback and applying CIFilters to it. I know that I can use video composition to get video with filters, but problems is that filters needs to be swipeable (with preview of next filter so we're using mask for 1st imageview and filtering 2nd one with next filter).</p>
  <pre><code>func displayLinkDidRefresh(link: CADisplayLink){
      
      let itemTime = videoOutput.itemTime(forHostTime: CACurrentMediaTime())
              
      if videoOutput.hasNewPixelBuffer(forItemTime: itemTime) {
          
          if let pixelBuffer = videoOutput.copyPixelBuffer(forItemTime: itemTime, itemTimeForDisplay: nil){
              unfilteredImage = CIImage(cvImageBuffer: pixelBuffer)
              displayFilteredImage(unfilteredImage: unfilteredImage)
          }
      }
  }
  </code></pre>
  <p>This is the code used to create AVPlayer instance and CADisplayLink:</p>
  <pre><code>    player = AVPlayer(playerItem: item)
      player.isMuted = true
     
      displayLink = CADisplayLink(target: self, selector: #selector(displayLinkDidRefresh(link:)))
      displayLink!.preferredFramesPerSecond = 24
      displayLink!.add(to: RunLoop.main, forMode: RunLoopMode.commonModes)
      
      NotificationCenter.default.addObserver(self, selector: #selector(self.playerItemDidReachEnd(notification:)), name: NSNotification.Name.AVPlayerItemDidPlayToEndTime, object: self.player.currentItem)
  </code></pre>
  <p>When running from debugger I experience no stutter (or it is at minimum level), but when running build from archive it is stuttering a lot. What I do to test is deleting app from phone and then instal it on the phone and test, as said debug builds are fine, but archive are creating issues. Any input on this?</p>
  <h1>EDIT 1:</h1>
  <p>Managed to get it to work better, but still stuttering after attaching video composition to player item when item and player status is readyToPlay.</p>