Im noticing about 450MB of memory footprint when loading a simple 2MB USDZ model.
To eliminate any mis-use of the frameworks on my part, I built a basic RealityKit app using Xcode's Augmented Reality App
, with no code changes at all.
Im still seeing 450MB in Xcode gauges(so in debug
mode)
When looking at memgraph, Im seeing IOAccelerator
and IOSurface
regions have 194MB and 131MB of dirty memory respectively.
Is this all camera-related memory?
In the hopes of reducing compute & memory, I tried disabling various rendering options on ARView as follows:
arView.renderOptions = [
.disableHDR,
.disableDepthOfField,
.disableMotionBlur,
.disableFaceMesh,
.disablePersonOcclusion,
.disableCameraGrain,
.disableAREnvironmentLighting
]
This brought it down to 300MB which is still quite a lot.
When I configure ARView.cameraMode
to be nonAR
its still 113MB
Im running this on iPhone 13 Pro Max
which could explain some of the large allocations, but would still like to see opportunities to reduce the foot print.
When I use QLPreviewController
same model (~2MB) takes only 27MB in Xcode-gauges.
Any ideas on reducing this memory footprint while using ARKit