performance notes

Mearsure Performance with Rail Model

response,animation,idle,load
TL;DR

- Focus on the user;the goal isn't to make your site perform fast on any specific device, its to ultimately make users happy.
- Respond to users immediately;acknowledge user input in under 100ms.
- When animating or scrolling,produce a frame in under 10ms.
- Maxmize main thread idle time.
- Keep users engaged;deliver interactive content in under 1000ms.

Focus on the user

Response:respond in under 100ms

Animation:produce a frame in 10ms

Idle:maximize idle time

Use idle time to complete deferred work. For example, keep pre-load data to aminimum so that your app loads fast, and use idle time to load remainning data/

Deferrend work should be grouped into blocks of about 50ms. Should a user begin interacting, then the highest priority is to respond to that.

To allow for <100ms response,the app must yield control back to main thread every <50ms,such that can execute its pixel pipeline,react to user input,and so on.

Working in 500ms blocks allows the task to finish while still ensuring instant response.

Load:deliver content under 100ms

Load your site in under 1 second.
Focus on optimizing the critical rendering path to unblock rendering.
You don't have to load everything in under 1 second to produce the perception of a complete load.Enable progressive rendering and do some work in the background.Defer non-essential loads to periods of idle time.

reference:https://developers.google.com/web/fundamentals/performance/rail