web performance for lamp developers (front end)

12
Web Performance for LAMP developers Sergey Chernyshev @SergeyChe

Upload: sergey-chernyshev

Post on 18-May-2015

2.401 views

Category:

Technology


0 download

DESCRIPTION

Sergey's short introduction to web performance for LAMP developers, presented at July 2011 NY Web Performance Meetup: http://www.nywebperformance.org/events/20619301/ Back-end presentation was done by Ronald Bradford

TRANSCRIPT

Page 1: Web performance for LAMP developers (front end)

Web Performance for LAMP developers

Sergey Chernyshev

@SergeyChe

Page 2: Web performance for LAMP developers (front end)

Performance? Why?

$$$ Money $$$

• Shopzilla +7-12% conversions! & -50% operation costs

• +15% (+60M) downloads for Firefox. (-1sec => +2.7% downloads)

• Slowness is sticky (Google and Microsoft)

User experience

SEO: Google uses site's speed in ranking

Page 3: Web performance for LAMP developers (front end)

"Front-end"

• Read waterfall diagrams

• Measure user's version of performance

• Use browser's cache

• "Compile" your web apps

Page 4: Web performance for LAMP developers (front end)

Waterfalls

Page 5: Web performance for LAMP developers (front end)

Metrics• TTFB

• Time to load

• Time to first render

• Above the Fold (AFT)

• Your business metrics

• Technical metrics (# of requests, page size, etc)

Page 6: Web performance for LAMP developers (front end)

Quick wins!

gzip(Apache configuration)

Browser Caching(Apache & PHP code)

Page 7: Web performance for LAMP developers (front end)

gzip

reduction of download time

~75% for text-based

~37% total

Page 8: Web performance for LAMP developers (front end)

Use Browser CacheKnow your last update

No download time is spent

Page 9: Web performance for LAMP developers (front end)

Use Browser CacheNever expire specific URL

Use update time as fingerprint

Page 10: Web performance for LAMP developers (front end)

Compile

• Combine CSS and JavaScript

• Minify CSS, JavaScript and even HTML

• Optimize images

• Version static / code URLs

Page 11: Web performance for LAMP developers (front end)

Drop-in .htaccess

Page 12: Web performance for LAMP developers (front end)

TrendsTrack your metrics over time