On Apr 25, 2014, at 8:08 AM, Jens Alfke <j...@mooseyard.com> wrote:

> I’m ending up at the opposite of the received wisdom, namely:
> * dispatch_sync is a lot cheaper than dispatch_async
> * only use dispatch_async if you really need to, or for an expensive 
> operation, because it will slow down all your dispatch_sync calls

Saying "dispatch_async will slow down *all* dispatch_sync calls" throws up red 
flags for me.

In my mind there's still a possibility that You're Doing It Wrong. You haven't 
completely outlined exactly what you've been doing, so it's very hard to offer 
any solid advice. For example, you didn't mention which queues you're 
dispatching too, how often your syncs are happen relative to the async, which 
threads they're being dispatch from, what in particular is happening within 
them, didn't show any instrument traces… 

I don't doubt you've found something, but your conclusion doesn't paint the 
whole picture. And as a matter of fact, I think your first email shows this:

        "On my MacBook Pro this gave me a nice speedup of 50% or more."

If it was all down to async universally slowing down all dispatch_sync calls, 
then wouldn't you expect it to be slower there too? It seems to me you need a 
better theory as to why the change you made worked. But really, we're flying 
blind here.



--
Seth Willits




_______________________________________________

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