You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In React native android app, using react native version 0.59.8, global.nativePerformanceNow is not defined.
React Native version: 0.59.8
Steps To Reproduce
Try to get time value in any js file using global.nativePerformanceNow()
Describe what you expected to happen:
As it was described in RN version 55.3 AndroidJSCFactory.cpp,
// Since SystemClock.uptimeMillis() is commonly used for performance measurement in Java
// and uptimeMillis() internally uses clock_gettime(CLOCK_MONOTONIC),
// we use the same API here.
// We need that to make sure we use the same time system on both JS and Java sides.
We cannot use systrace in Android (since only stub is open sourced). We invested so much in building tooling to measure performance, and now when we change the version, such basic api vanishes.
I have encountered very same issue. After Profiler API (https://reactjs.org/docs/profiler.html) was released, this feature is even more important than before. Currently it is impossible to get precise execution time without the real performance.now() (and without using a remote debugger). Without performanceNow we are forced to use local date, which is not good enough.
It seems like this feature was removed during transition from JSC to JSI and it was never reimplemented.
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.
stalebot
added
the
Stale
There has been a lack of activity on this issue and it may be closed soon.
label
Feb 20, 2020
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
In React native android app, using react native version 0.59.8, global.nativePerformanceNow is not defined.
React Native version: 0.59.8
Steps To Reproduce
Describe what you expected to happen:
As it was described in RN version 55.3 AndroidJSCFactory.cpp,
// Since SystemClock.uptimeMillis() is commonly used for performance measurement in Java
// and uptimeMillis() internally uses clock_gettime(CLOCK_MONOTONIC),
// we use the same API here.
// We need that to make sure we use the same time system on both JS and Java sides.
We cannot use systrace in Android (since only stub is open sourced). We invested so much in building tooling to measure performance, and now when we change the version, such basic api vanishes.
https://github.com/facebook/react-native/blob/0.53-stable/ReactAndroid/src/main/jni/react/jni/AndroidJSCFactory.cpp
The text was updated successfully, but these errors were encountered: