For context: I'm working on a score pad app, with the ability to have a column of PKCanvases, so you can just hand write things without them being scribbled into text. As part of my stress testing, I basically filled the grid with ~50 canvases, and it seems that after a certain amount of CanvasViews are added to the score pad, my M1 iPad Pro GPU is unable to keep up.
Occasionally, a cell will just entirely render as magenta, and I will have dozens and dozens of
Execution of the command buffer was aborted due to an error during execution. Insufficient Memory (IOAF code 8)
logs thrown to the console.
I honestly don't know where to go from here. I recognize that what I'm doing is almost definitely not what PencilKit was designed for, but I also know the API is relatively young. I can't tell if this is a bug that should be fixed by Apple, or entirely my fault and a sign that I need to redo the entire thing.
I've attached a screenshot with the magenta cell, there's also another two cells where the pencil strokes are just thick black squares. I'd appreciate any advice or help, I can't even seem to find any way to detect and recover from this in my code, as trying to search for Metal errors gives me discussions about writing Metal apps, which this isn't. It's a pure SwiftUI app with some PencilKit canvases.