Re: What is ~/Library/Caches/<my app>/<...> for?
Re: What is ~/Library/Caches/<my app>/<...> for?
- Subject: Re: What is ~/Library/Caches/<my app>/<...> for?
- From: Graham Cox <email@hidden>
- Date: Tue, 05 May 2015 15:24:46 +1000
> On 5 May 2015, at 2:50 pm, Jens Alfke <email@hidden> wrote:
>
>
>> On May 4, 2015, at 8:05 PM, Graham Cox <email@hidden> wrote:
>>
>> Does anyone know what these are for?
>
> I'm pretty sure that's Foundation's URL-loading cache — anything that loads resources over HTTP using NSURLSession or NSURLConnection will end up storing data there.
OK, but my app isn’t doing anything with those classes. (This is a different app than the one I was discussing a few weeks ago that was using these).
>
>> I’ve been tracking down a problem with my app reported by a couple of users (but naturally unreproducable when running in the debugger) where a thread was spinning causing high CPU usage and laggy performance.
>
> Did you ask them to sample the app using Activity Monitor? That's the most useful way to diagnose such problems if you can't reproduce them yourself.
>
Yes, that’s how we knew that one thread was spinning - constant usage around 100% with general lagginess. More difficult was interpreting the spindump report - it really isn’t all that enlightening because a) the code running during the samples didn’t appear to be a likely culprit, and b) there was no symbolication of stuff in my app, only the OS stuff. Apparently there is a way to symbolicate a spindump, but I wasn’t able to get it working.
We tried everything to stop the app immediately going to 100% after launching - trashing its prefs, even its entire sandbox, documents that were being restored from autosave, you name it (rebooting each time). Nothing worked until we removed the cache files. Weird though, putting them back does not restore the bad behaviour, but since they’re not created directly by my code, it could be that whatever was happening just got into a bad state and removing the files temporarily fixed it up.
Not even sure if this is a genuine fix or not - I’m waiting on a couple of users trying it to see if it clears their problem as well.
—Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden