Performance matters for all kinds of websites

How you can fine tune performance and become a google developer tool ninja?

There are three pillars of performance

1. Network
2. Render
3. Compute

How you can minimize full power radio use?

1. Prefetch and cache data
2. Eliminate periodic transfers like polling
3. Batch your requests

Minimizing Network Latency

1. Avoid redirects (use 301 redirects if possible)
2. Minimize or eliminate render-blocking resources (stylesheet , fonts , unknown-size images)
3. Avoid blocking on download of javascript (use async or defer when possible)
4. Prioritize visible content!

What problems do memory constraints cause?

1. You’re going to run out of memory more frequently
2. The garbage collector is going to run more frequently
3. Low memory conditions will drain the battery

How to do we minimize garbage collection?

1. Use less memory!
2. Minimize dynamic object allocation
3. Implement your own memory management
4. Test for leaks carefully

Help the garbage collector out!

1. Use appropriate scope
2. Unbind event listeners
3. Clean any data caches

Which API Should you use for animation?

1. request animation frame

window.requestAnimationFrame(function);

1. Combines reflows/repaint into one cycle
2. Locks visual updates to screen refresh
3. Doesn’t do work when tab isn’t visible