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

前端 未结 5 1515
失恋的感觉
失恋的感觉 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:48

    I was getting a lot of the 'Not optimized: optimized too many times' warnings and these functions were running much slower than they should have.

    I was able to fix these functions by doing these things:

    1. Removing unused variable declarations

    2. Removing function calls from loops that iterate many times (>1000 i suspect)

提交回复
热议问题