chrome 性能选项卡的用户计时部分并不总是提供子组件的统计信息

Stats for child components are not always available in User-Timing section of chrome performance tab

下面是我尝试分析一些 React 应用程序的屏幕截图。

如您所见,InspectionPage 组件被选中,但是在 Bottom-Up 选项卡中没有显示有关子组件的信息,例如,我们可以在这里看到 - https://twitter.com/dan_abramov/status/994577100077191168.

奇怪的是 - 情况并非总是如此。有时它是可用的,有时却没有给出看似完全相同的条件。

在我自己努力解决之后,my answer here 是我能找到的唯一明确的解决方法。

It appears to be an issue with the current stable release of Chrome. Using a newer version of Chrome, such as Chrome Dev or Canary, will allow you to use the breakdown until the update makes its way into a stable release of Chrome.

Sources: