Chrome JS profiler and warnings "Not optimized: built-in crash"

I tried to run my application using JS Profiler that records CPU usage, and I have a few warnings that some of them are “ForInStatement is not a quick case”, which I fixed, but I get Inlining Bailed Out warnings, for example, in this code:

function display_loader(){
  for(i in obstacles){
    display(obstacles[i])
  }
}

This function basically creates obstacles (the display (obstacles [i]) draws a specific image of the obstacle - two separate functions for loading and for the code due to the “ForInStatement” warnings mentioned above).

The message "Inlining Bailed Out" appears randomly, especially when I play for more than a minute, and it appears in the functions move_loader, display_loader or collision_loader. Sometimes it happens, sometimes not.

Can you give me some explanation for what this message means? I read a lot of streams over the network and I understand the logic of "ForInStatement", but I do not know how to do this using Inlining Bailed Out.

Also, can you let me know how I can fix this?

Thank!

+4
source share
1 answer

bailout , . JS, try/catch, for of .., , .

:

. ( "" )

. , Inlining . , . , .

, , , - display, . , / :

, s hort-running programs [...] . , , , .

, , V8 . , .

. , .

0

Source: https://habr.com/ru/post/1547077/


All Articles