optimize
TRANSCRIPT
Optimizing Load Times& Performance
Client / Server / Backend
Alex Gvozden www.CaseTrek.com / Eleven accelerator
[email protected] @mrsteel
Why Optimize it?
Increase UXRank better on GoogleUse resources better
How?
Server configurationReduce requests and file sizes
Code optimizationCaching
Server
Choose a good hostingGood customer service
Google for “Problem with … hosting”
Server configuration
Compress content http://en.wikipedia.org/wiki/HTTP_compression
http://httpd.apache.org/docs/2.2/mod/mod_deflate.htmlhttp://www.neiland.net/blog/article/enable-gzip-compression-in-apache-httpd-with-moddeflate
/
Server configuration
Add Cache-Control and Expires headersmod_cache & mod_expires
http://www.askapache.com/htaccess/apache-speed-cache- control.html
Or use HTTP headers, etc. <meta http-equiv="Cache-control" content="public">
http://www.peej.co.uk/articles/http-caching.html
Server configuration
Host assets separately (JS, CSS, Images) http://yuiblog.com/blog/2007/04/11/performance-research-part-4/
Server configuration
Host assets separately (JS, CSS, Images) http://yuiblog.com/blog/2007/04/11/performance-research-part-4/
Reduce requests & File size
Combine and minify CSS & Javascripthttps://code.google.com/p/minify/
Reduce requests & File sizes
Optimize image sizesImageOptim for Mac
Online http://www.smushit.com/ysmush.it/
Reduce requests & File sizes
Sprite sheets…
Code optimization
APC for PHPOpcode cache for PHP
http://php.net/manual/en/book.apc.phphttp
://www.slideshare.net/vortexau/improving-php-application-performance-with-apc-
presentationApc.stat
Code optimization
Tips and tricks http://www.chazzuka.com/63-best-practice-to-optimize-php-code-performances-58
/
Caching
Use APC – non distributedor Memcached - distributed
http://memcached.org/
Cache vars, templates, SQL queries
And PHP faster-> FastCGI
Even more speed and less memory consumedhttp://www.brandonturner.net/blog/2009/07/fastcgi_php_opcode_cache_benchmarks/