MTKView initwithFrame:device takes 2-3s

my app use mtkview to render video, but [MTKView initwithFrame:device] takes 2-3s in some some 2019 macbook pro, system macos 15.0.1. how can I do?

We typically recommend this sample AVCamFilter: Applying Filters to a Capture Stream to show the essential setup.

If you're initializing your MTKView with a very large frame you could see some performance issues on older MBPs with integrated GPU. 2 - 3 seconds does seem like quite a lot though.

MTKView initwithFrame:device takes 2-3s
 
 
Q