JavaScript Profiler 在 Chrome 79 for Windows 中:不再提及是否优化。

huangapple go评论82阅读模式
英文:

Javascript Profiler in Chrome 79 for Windows: No more mention of optimized or not

问题

Chrome 79 for Windows中的JavaScript分析器似乎不再提到一个函数是否已经被优化。在滚动到一个函数上时,以前可以在图表视图中找到这个信息。这个信息现在还可用吗?在现今的Turbofan中是否仍然相关?

英文:

The Javascript profiler in Chrome 79 for Windows seems to no longer mention whether a function has been optimized or not. This used to be available in chart view when rolling over a function. Is this information available any longer? Is it even relevant with Turbofan, nowadays?

答案1

得分: 3

我们不再在DevTools中显示这些信息。现在通过性能面板是JS性能分析的支持方式,但正如你所说,我认为不再公开TurboFan的优化/去优化决策不太相关,因为没有关于不能进行优化的结构或模式的硬性规则。我们不希望推动开发人员对编译器进行微观优化。

另一个考虑因素是有用地显示此信息 - 我怀疑旧版本只会告诉你函数是否曾被优化过,而不会告诉你是否针对特定调用进行了优化。要使此信息有用,您希望查看函数何时优化,相对于各种调用。但我认为这些信息对V8开发人员更具操作性,对Web开发人员而言不太重要,因此我们不公开它。

英文:

We don't surface this information in DevTools anymore. The supported way of profiling JS is through the Performance panel now, but as you say I think it's less relevant to expose optimizations/deoptimization decisions with TurboFan, as there are no hard rules on constructs or patterns that can't be optimized. We don't want to push developers to micro-optimize their code to the compiler.

Another consideration is displaying this info usefully - I suspect the old version that did show optimization info only told you if the function was ever optimized, not that it had been optimized for that specific invocation. To make this info useful you would want to see when the function was optimized, relative to the various invocations. But I think this info is more actionable for V8 developers and not so much for web developers, so we don't expose it.

huangapple
  • 本文由 发表于 2020年1月7日 00:07:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/59615307.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定