What is the purpose of the new .memoryTarget option in CIContextOption added in iOS 17? And it is interesting that this option is added only in swift interface.
https://developer.apple.com/documentation/coreimage/cicontextoption/4172811-memorytarget
From the comment in the header file:
A
NSNumberthat specifies the maximum memory footprint (in megabytes) that theCIContextallocates for render tasks. Larger values could increase memory footprint while smaller values could reduce performance.
It basically sets how much memory Core Image is allowed to use (roughly) during rendering. From what I observed, the default seems to be 256 MB.