Add in the optimization to check the first/least timer in the queue before iterating#27841
Add in the optimization to check the first/least timer in the queue before iterating#27841ejanzer wants to merge 1 commit into
Conversation
|
This pull request was exported from Phabricator. Differential Revision: D19522346 |
|
|
cc @d4vidi |
|
LGTM, except for maybe these concerns:
|
|
@d4vidi Agree about the repetition, I'll make a change. I did actually add unit tests for this function in the previous PR: https://github.com/facebook/react-native/blob/master/ReactAndroid/src/test/java/com/facebook/react/modules/timing/TimingModuleTest.java#L259 I haven't added any tests explicitly for this optimization, because that feels like an implementation detail that probably doesn't make sense to test (the functionality hasn't changed). |
…efore iterating (facebook#27841) Summary: Pull Request resolved: facebook#27841 Follow up from facebook#27539 - adding back in the optimization that Detox has in TimersIdlingResource to avoid iterating over the entire timers queue if the next timer is already within the specified range. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D19522346 fbshipit-source-id: 259587031fef2971f84027df97d240ae85a401ed
|
This pull request was exported from Phabricator. Differential Revision: D19522346 |
b54110d to
0a514a8
Compare
|
This pull request was successfully merged by @ejanzer in 8f5779c. When will my fix make it into a release? | Upcoming Releases |
…efore iterating (facebook#27841) Summary: Pull Request resolved: facebook#27841 Follow up from facebook#27539 - adding back in the optimization that Detox has in TimersIdlingResource to avoid iterating over the entire timers queue if the next timer is already within the specified range. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D19522346 fbshipit-source-id: 32609f434d1ca575a5a49ad630e288c43fa90864
Summary
Follow up from #27539 - adding back in the optimization that Detox has in TimersIdlingResource to avoid iterating over the entire timers queue if the next timer is already within the specified range.
Changelog
[Internal]
Test Plan
TimingModuleTest
Differential Revision: D19522346