Hey.

I understand browser rendering optimization at the Udacity rate. There is such a thing as the life cycle of an application. These are 4 components - Load , Idle , Animation , Response ( LIAR , usually called RAIL ). Confused in this matter.

  1. load is first ( Load is the first stage of the application life cycle), you need to be packed in 1 second at this stage.
  2. Then it goes simple when the browser does not count anything ( Idle is the second stage), at this stage you can upload, for example, images from the most visited pages of this site so that they load faster. This stage can last about two seconds - a couple of seconds pass (a person evaluates what is before his eyes) before a person starts clicking something on the page. At this stage, it is necessary to break Idle- scripts into pieces of 50 milliseconds in order to catch the beginning of human interaction with the page without brakes.
  3. As soon as a person begins to interact with the page, Idle- scripts stop their preloading and give way to other scripts, for example, animation scripts ( Animation is the third stage). Example - a person pressed the menu button, and the button is animated. The animation script needs to be packed within 10 milliseconds in calculations, plus 6 milliseconds to create the frame by the browser, totaling 16 milliseconds per frame will give 60 frames per second.

I DO NOT UNDERSTAND - Why does the 4th stage of the life cycle of an application Responce go to the last stage?

    1 answer 1

    Because these are not stages , they are aspects ( four distinct aspects ), and they relate more to achieving good UX than to technical limitations / requirements.

    And they are not about sequential processes. They are not ordered , they relate to certain types of user interaction with the application. Each of these aspects occurs more than once during the operation of the application, and in a different order, and not only during the initial loading process, but also during the operation after it.

    This could just as well have been LAIR (lair). But this does not fit very well with the purpose of these aspects of performance.

    RAIL (rail, smooth, like performance) as the name just fits better.

    • How load can occur more than once? There is some kind of book where VERY detail is written about it? only articles alone met, including on google developers, they only casually tell - Dimon
    • @Dimon XHR, well. And analogues. - D-side
    • I don't understand the idle aspect, how to use it. It is written that you can download something from those pages of the site where a person is most likely to go after reading this page. I have never come across preloading and scripts that can work in an idle period. if you look at it without me, then I understand. for example, I wrote Pac-Man in javascript. the game was loaded into the browser so that there was no big delay between pressing the button and the animation of the pakman object I controlled, I broke the calculation of the enemy's movement trajectories into pieces in one game cycle. - Dimon
    • I do not understand why the idle script should be split into pieces of 50 milliseconds - Dimon
    • @Dimon "User input should be limited to the user input." JS is one-threaded (not counting webwearers, which are in themselves) and hanging on any action for> 50ms may not give time to react to user input or external events, breaking R or L. - D-side