Hey guys
My app uses iMedia 3 (master branch, sandboxed with XPC services) as a backend to access the user's images in iPhoto and Aperture programmatically. So far I created a libraryController once and loaded the parsers I need at the startup of the app. The objects where then kept for the lifetime of the application (which is usually quite long as it runs in the background and typically starts when the user logs in). I noticed that the XPC services seem to cache quite a lot of data when requesting images and nodes, which frequently leads to memory consumptions of 200Mb+ per XPC service after a couple of hours. For an app that runs in the background and only sporadically needs to access data from the libraries (and rarely accesses the same data twice) that is obviously suboptimal, hence I am trying to cut down on the memory footprint of the XPC services.
My first idea was to unload the services when they are not needed and reload them when they are needed again. I tried doing this by unloading the parsers that are not in use anymore (using the parserController and the unloadParserMessengers method) and unloading the libraryController but neither lead to the termination of the XPC services.
Is anybody else running into this issue or has any ideas how I could reduce the memory footprint? Is there a way to control what is cached by the XPC services?
Thanks,
Robin