re-frisk-remote icon indicating copy to clipboard operation
re-frisk-remote copied to clipboard

Timer warning in React Native

Open jeaye opened this issue 6 years ago • 0 comments

When running re-frisk-remote on Android with React Native, I see the following warning in my logs:

ReactNativeJS: Setting a timer for a long period of time, i.e. multiple minutes, is a performance and correctness issue on Android as it keeps the timer module awake, and timers can only be called when the app is in the foreground. See https://github.com/facebook/react-native/issues/12981 for more info.
ReactNativeJS: (Saw setTimeout with duration 89532ms)

The duration isn't always the same, but it's always the same warning. Rather than setting a large timeout, it'll likely be necessary to use smaller, recursive timeouts to avoid this warning (and the issues it causes).

jeaye avatar Mar 04 '18 19:03 jeaye