nothirst / TICoreDataSync

Automatic synchronization for Core Data apps, between any combination of Mac OS X and iOS: Mac to iPhone to iPad to iPod touch and back again.
https://github.com/nothirst/TICoreDataSync/wiki
807 stars 61 forks source link

Excessive memory usage when applying numerous change sets #91

Open ghost opened 10 years ago

ghost commented 10 years ago

I have found that TICDS uses excessive memory when applying numerous change sets. Even though applyUnappliedSyncChangeSets: in the main TICDSSynchronizationOperation runs each change set within an @autorelease pool, memory load continues to increase and does not go back to a baseline level when going to the next change set. This can cause the apps to slow down or even crash if memory use becomes too much for the device to handle.

kevinhoctor commented 10 years ago

I've recently noticed this as well and am investigating the problem. Thanks.

ghost commented 10 years ago

This may have to do with the core data architecture. It may need to be revamped to more appropriately use subcontexts and clear them every X steps.

scottcarter commented 10 years ago

I just ran across this project and started to browse the open issues. If this might be a Core Data issue, you might want to check out an article I wrote:

http://finalize.com/2013/01/04/core-data-issues-with-memory-allocation/

No response from Apple on the bugs I filed.

kevinhoctor commented 10 years ago

Thanks for the excellent article, Scott, and for the radar reports. I'll follow up and dup them if I can.