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
Don't use KVO in RACCommand #2334
Conversation
This seems legit to me, but I'd love to have a second set of 👀. /cc @ReactiveCocoa/reactivecocoa |
Haven't looked at the code closely yet, but this would technically be a breaking change for RAC3. This should probably be targeted at the |
Personally, it feels strange to remove a feature – possibly a breaking change – solely for the sake of unit test run duration. |
How is this a breaking change? It changes the implementation, but maintains the current behavior and interface. |
|
Ah, okay. I just added that back (with a test). That's not an important part of the PR—the important part is not using Edit: Actually, that still works without changes. But there's a test now. |
Coooool – looks good 💯 I'm not the most judicious code-reviewer, though. Someone else should double-check juuuust to be sure. |
This looks right to me too so here goes nothing |
💖 |
RACCommand
has always been slow/expensive to initialize. Due to some absurd slowness in our app's unit tests, I started profiling and found that in our tests we were spending a lot of time rehashing inside KVO.This PR changes
RACCommand
so that it no longer uses KVO, saving on initialization and disposal. The changes here make our app's unit tests run ~15% faster. (We create a lot ofRACCommand
s.) I'm sure the savings won't be as noticeable in the real world, but I think these changes should still improve things.