What do the “Not optimized” warnings in the Chrome Profiler mean?

前端 未结 5 1512
失恋的感觉
失恋的感觉 2021-01-30 16:20

When I use the Developer Tools in Chrome to collect JavaScript CPU Profiles, I am getting two mysterious warnings on functions:

  • Not optimized: optimized too many t
5条回答
  •  清酒与你
    2021-01-30 16:49

    The explanations for these bailout reasons are being crowdsourced and documented in this github thread: https://github.com/GoogleChrome/devtools-docs/issues/53

    The short explanation: V8 will not try to optimize functions with some constructs, try/catch block is one example, the full list may change over time as the engine evolves. It can also give up if it tries to optimize and then has to deoptimize some hot function too many times (e.g. because of the type feedback being different each time the function executes).

提交回复
热议问题