gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 03:19:04 28 4
gpt4 key购买 nike

我需要衡量 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/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com