Chrome Devtools React Profiler时机与现实
在Chrome DevTools中的React Profiler中,应用程序重新渲染的时机如下:
这意味着210ms重新启动整个应用程序。实际上,大约需要2秒钟,这比Profiler显示的要多得多。关于2秒加载的情况相同的情况是当DevTools不打开时,因此不能进行开销。同样在应用程序的生产构建中,大约需要同一时间重新渲染。
我必须提到这是该应用程序的开发版本,突出显示组件渲染
关闭时,始终从源
中求解挂钩名称已关闭。在此渲染中没有实现提取请求。
原因是什么?
In the React Profiler in Chrome DevTools the timings for the app re-rendering are as follows:
That means 210ms to re-render the whole app. In reality it takes around 2 seconds which is a lot more then profiler shows. The same situation regarding the 2 seconds loading is when DevTools are not open, so it can't be some overhead processing. Also in the app's production build it takes roughly the same time to re-render.
I have to mention that this is development version of the app, the Highlight updates when components render
is OFF, Always parse hook names from source
is OFF. No fetch requests were realized in this render.
What could be the cause for this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论