Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 9 performance issues #2383

Closed
karmeye opened this issue Sep 18, 2015 · 7 comments
Closed

iOS 9 performance issues #2383

karmeye opened this issue Sep 18, 2015 · 7 comments

Comments

@karmeye
Copy link

karmeye commented Sep 18, 2015

I got major performance degradation on iOS 9 compared to iOS 8. I suspect it's related to these radars and this method:

[NSObject addObserver:forKeyPath:options:context:]

Anyone else who can relate?
I notice it mostly when loading / reloading collection views, which means signals are created and observers added for views, view models and models related to the cells.

@joshaber
Copy link
Member

Yup, this is a problem for us too. Unclear at this point how we can mitigate it.

@neilpa
Copy link
Member

neilpa commented Sep 18, 2015

facebookarchive/KVOController#72 has a disturbing graph of the problem

@karmeye
Copy link
Author

karmeye commented Sep 18, 2015

@neilpa Ouch, that's looks really bad.

addObserver is pretty much the heart of RAC isn't it?
Guess we're dependent on a fix from Apple. Even if we can somehow mitigate it, its not good enough if its not around O(1).

I'll go dupe these radars.

@neilpa
Copy link
Member

neilpa commented Sep 18, 2015

My guess is they "fixed" the dealloc races that existed in KVO prior to iOS9. Working around those races is the main reason for KVOController. There's numerous past issues in this repo that touch on the problem as well.

@mdiep
Copy link
Contributor

mdiep commented Sep 18, 2015

This was part of the motivation for #2334.

@neilpa
Copy link
Member

neilpa commented Sep 18, 2015

Sadly, RACCommand is likely only a small portion of the general RACObserve usage across an app.

@karmeye
Copy link
Author

karmeye commented Sep 19, 2015

Apparently many KVO issues was fixed.

But this issue has now been "observed" :) No need to dupe more radars:

https://twitter.com/Catfish_Man/status/644928403402018820
https://twitter.com/steipete/status/644903661626331141

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants