On Jan 25, 2016, at 01:10 , Markus Spoettl <ms_li...@shiftoption.com> wrote:
> 
> Has anyone any idea how the removing of observers can cause this kind of 
> death spiral?

Genocidal refreshes aside, are you absolutely sure that you’re always 
removing/adding observers on an appropriate thread? There are two dangers here:

1. You may be doing things on a background thread that are supposed to be done 
on the main thread.

2. You may be doing things on multiple threads. In particular, doing massive 
quantities of retains and releases (via ARC) on multiple threads simultaneously 
has terrible performance characteristics, because (I think) there’s a lock 
involved. I would also assume that massive quantities of multi-threaded allocs 
and frees would be bad, because there has to be some kind of lock there too.

Without contention, these locks are likely zero-cost (more or less). With 
parallelism, the results can be bad.

There’s no particular reason to think that any of these things are happening in 
your scenario, but they might be worth looking into.

_______________________________________________

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