On Apr 24, 2014, at 22:49 , Jens Alfke <j...@mooseyard.com> wrote:

> It is, but most of it appears to be memory management _caused_ by GCD, since 
> it goes away when I replace the dispatch calls with @synchronized. GCD is 
> apparently causing a lot of blocks to get copied to the heap.

Well, you know what you’re seeing in Instruments, but this characterization 
seems improbable. Ignoring the GCD-specific entries, if block copy was causing 
a large number of retains and releases (if that’s what you meant by “refcount 
bookkeeping”), I’d expect there to be a large number of block copies, too. If 
block copies (as I’d also expect) are much more time-consuming than the 
retains/releases, by comparison you’d barely notice the retain/release times in 
Instruments. If the retains/releases caused by block copies do dominate, that 
suggests the block copies are comparatively very cheap, which in turn suggests 
a horrible bug in block copies.

With luck someone might jump in with a plausible answer, but this is starting 
to sound TSI-worthy.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to