breaking performance web rules

15
Breaking performance web rules Pablo Moretti @elsantob Sunday, April 28, 13

Upload: pablo-moretti

Post on 05-Dec-2014

412 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Breaking performance web rules

Breaking performance web rules

Pablo Moretti @elsantob

Sunday, April 28, 13

Page 2: Breaking performance web rules

¿Importa la velocidad ?

Sunday, April 28, 13

Page 3: Breaking performance web rules

What is the Time to First Byte?

The TTFB can be under 100 milliseconds (ms) for static

For dynamic content, the TTFB is often 200-500ms -> SQL tunning-> Cache-> NoSql-> Paralelizar

Sunday, April 28, 13

Page 4: Breaking performance web rules

Básico

Recursos cacheados

Gzip

Sunday, April 28, 13

Page 5: Breaking performance web rules

No siempre hay cache

Sunday, April 28, 13

Page 6: Breaking performance web rules

NetworkingLatencia

Elegir servidores cercanos geográficamente

Uso de CDN para recursos estáticos

Conexiones HTTP

Paralelizar descarga usando múltiples dominios (el límite depende del browser)

Keep Alive

Sunday, April 28, 13

Page 7: Breaking performance web rules

Reduciendo Request

Sprite -> descargar múltiples imágenes en una sola

Data64 -> imágenes inline (para contenido muy pequeño)

Unificar recurso -> CSS y JS (unificarlos estratégicamente para compartir recursos en todo el sitio)

Sunday, April 28, 13

Page 8: Breaking performance web rules

Minimizando RequestDominios libres de cookies para contenido estático

Optimizar imágenes (smush it)

Nuevo formato de imagen WebP (35%)

Minificación (mejora 5% a pesar de tener gzip) http://en.wikipedia.org/wiki/Minification_(programming)

Sunday, April 28, 13

Page 9: Breaking performance web rules

Priorizando descarga

Start page

DomReady

OnLoad

OnScroll

OnTimeOut

Ordenar la descarga en base a la interacción de

los usuarios

Sunday, April 28, 13

Page 10: Breaking performance web rules

Cargando Javascript

Sunday, April 28, 13

Page 11: Breaking performance web rules

Cargando Javascript

Sunday, April 28, 13

Page 12: Breaking performance web rules

PrefechPrecargar contenido anticipando al usuario

HTML5 Nativo

Javascript

Sunday, April 28, 13

Page 14: Breaking performance web rules

SPDY -> Lo que se vieneThe goal of SPDY is to reduce web page load time. This is achieved by prioritizing and multiplexing the

transfer of web page subresources so that only one connection per

client is required.

Sunday, April 28, 13

Page 15: Breaking performance web rules

Sitios y Herramientashttp://developer.yahoo.com/performance/rules.html

https://developers.google.com/speed/

http://www.stevesouders.com/

http://www.phpied.com/

Sunday, April 28, 13