react-native 分析不显示 JS 线程 [英] react-native profiling doesn't show JS thread
问题描述
我按照官方指南来分析我的 JS:
知道发生了什么吗?界面非常缓慢,占用了 100% 的 CPU,但我不知道为什么.
看起来使用最新的 react-native 版本可以解决这个问题,我使用的是 0.30.0
并且看起来在 0.34.0
周围引入了一些相关的更改>
您可以在调试时通过 debuggerWorker.js
简单地使用 chrome 分析器:
调试时分析不会给你最准确的结果,所以要小心.
I followed the official guide to profile my JS: https://facebook.github.io/react-native/docs/android-ui-performance.html
But when I get the results, there's no js-related code I can look at:
Any idea what happened ? The interface is pretty sluggish, cusuming 100% of a CPU, but I get no infos why.
EDIT: looks like using the latest react-native version could solve that, I'm using 0.30.0
and looks like some related changes were introduced around 0.34.0
You can simply use the chrome profiler over debuggerWorker.js
while debugging:
Profiling while debugging won't give you the most accurate results so be careful.
这篇关于react-native 分析不显示 JS 线程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!