performance - 衡量 React Native 应用程序的性能

标签 performance react-native

我需要衡量 React Native 应用程序的性能。什么是最好的工具?

我在 google chrome 中尝试使用 google trace,在 iOS 平台上尝试使用 mac 中的 Instruments,但是这些向我展示了很多无组织的数据。

最佳答案

我实现了一些帮助我检查应用程序性能的工具,下面是工具列表:

1)( react 器)https://github.com/infinitered/reactotron

这是获取应用程序日志(redux 操作等)的最酷方法,我已将此工具集成到我的项目中,以防您需要任何帮助,请随时提问。

2) https://facebook.github.io/react/docs/perf.html ( react-addons-perf )

这个工具告诉你有关帧/秒、实例等的信息。这是一个 react 工具,可以与 react 原生集成。

Use the built-in Profiler to get detailed information about work done in the JavaScript thread and main thread side-by-side.

For iOS, Instruments are an invaluable tool, and on Android you should learn to use systrace.

You can also use react-addons-perf to get insights into where React is spending time when rendering your components.

Another way to profile JavaScript is to use the Chrome profiler while debugging. This won't give you accurate results as the code is running in Chrome but will give you a general idea of where bottlenecks might be.



注意:上述工具用于监控 javascript 性能,例如渲染组件所花费的时间,redux 中的哪些操作介于常规操作流之间。

干杯:)

关于performance - 衡量 React Native 应用程序的性能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43701755/

相关文章:

react-native - 回调中的问号

objective-c - 如何在 Objective C 中使用 RCT_EXPORT_VIEW_PROPERTY 检测属性更改?

javascript - React Native Touchable 不透明度函数

javascript - ToDo 完成状态未保存在 React Native 的存储中

mysql - 使用 MySQL 在大表上运行更新非常慢

c# - 如何使此 LINQ 查询更快?

java - antlr4 在多核 CPU 上的性能

mysql - 存储缓存数据 - 多少格式化?

performance - 过期和 CDNS - YSlow 问题

reactjs - axios.post 返回 400 React Native 的错误请求