Your SlideShare is downloading. ×
0
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Websites Performance Highlights
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Websites Performance Highlights

682

Published on

Presentation illustrate the principles of enhancing the performance of any website. Enriched with examples and list of techniques

Presentation illustrate the principles of enhancing the performance of any website. Enriched with examples and list of techniques

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
682
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Websites Performance HighlightsWhere does the time go?<br />Ala’ YasinAbuhijleh<br />Software Development Manager, Bayt.com<br />1<br />
  • 2. Where does the time go?<br /> Internet<br />Request<br />2<br />
  • 3. Where does the time go?<br /> Internet<br />3<br />Processing<br />Rendering<br />Loading<br />
  • 4. Where does the time go?<br /> Internet<br />4<br />20%<br />Processing<br />Rendering<br />Loading<br />80%<br />Request<br />
  • 5. HTTP Overview<br /> Internet<br />5<br />DNS<br />
  • 6. HTTP Overview<br /> Internet<br />6<br />TCP/ IP<br />
  • 7. HTTP Overview<br /> Internet<br />7<br />TCP<br />HTTP Request<br />
  • 8. HTTP Overview<br /> Internet<br />8<br />TCP<br />HTTP Response<br />
  • 9. HTTP Request<br />9<br />Get /en/jobs HTTP 1.1<br />Host: www.bayt.com<br />User-Agent: Mozilla/5.0 Gecko Firefox/1.5.0.9<br />Accept-Encoding: gzip,deflate<br />……..<br />other headers<br />
  • 10. HTTP Response<br />10<br />HTTP/1.1 200 OK<br />Content-type: text/html<br />Last-Modified: Wed, 2 Feb 2010 04:15:54 GMT<br />… Content<br /><html> <br />…<br />
  • 11. HTTP OVERVIEW<br />11<br /><!-- start rendering content --><br /><html><br /> <head><br /> <script src=“script1.js”/><br /> <style src=“style1.css” /><br /> </head><br /> <body><br /> <imgsrc=“image1.jpg “ /> <br /> …<br /> …<br />Initiates a new request<br />Initiates a new request<br />Initiates a new request<br />
  • 12. HTTP OVERVIEW<br />12<br /><ul><li> Each src attribute is a new request
  • 13. www.cnn.com 127 requests
  • 14. www.bayt.com  68 requests
  • 15. www.google.com  11 requests!</li></li></ul><li>Processing Optimization Principles<br />13<br /><ul><li>Reduce I/O reads
  • 16. Reduce Memory and CPU usage
  • 17. Reduce network connections
  • 18. Stay inside the application process, If you can!
  • 19. Avoid over-processing</li></li></ul><li>Example: Caching<br />14<br />Data Store<br />Caching<br />Application<br />
  • 20. Example: Caching<br />15<br /><ul><li>Local to application server
  • 21. Distributed cache: Memcache
  • 22. Cache data/pages/parts of pages</li></li></ul><li>More Processing Optimization Techniques<br />16<br /><ul><li>Pre-request pages parsing
  • 23. Load Balancing
  • 24. Master-Slave / separate writes from reads</li></li></ul><li>Loading Optimization Principles<br />17<br /><ul><li> Reduce HTTP requests
  • 25. Reduce response size
  • 26. Cache content on browsers/proxies
  • 27. Reduce DNS lookups</li></li></ul><li>Example: JavaScript Optimization<br />18<br />function showAlert( message1, message2, status) {<br /> if ( status == 1 ) {<br /> alert( message1 )<br /> } else {<br /> alert ( message2 )<br />}<br />}<br />135 Characters = 135 bytes transferred over the internet<br />
  • 28. Example: JavaScript Optimization<br />19<br />62 Characters = 62 bytes<br />62/135 = 45% !<br />Same functionality with 45% of bytes<br />function shwAlrt(msg1,msg2,st){(st==1)?alert(msg1):alert (msg2)}<br /><ul><li>Minification:
  • 29. No wrapping = -2 characters/line
  • 30. No white spaces
  • 31. Obfuscation: message1  msg1</li></li></ul><li>More Loading Optimization Techniques<br />20<br /><ul><li>CDN
  • 32. Expire Headers
  • 33. Compression/Gzipping
  • 34. No Redirects</li></li></ul><li>Rendering Optimization Principles<br />21<br /><ul><li> Make use of progressive rendering
  • 35. Reduce client side processing
  • 36. Maximize parallel downloads</li></li></ul><li>Example: CSS on Top<br />22<br /><ul><li> No redraw
  • 37. Styles applied directly
  • 38. No blank page
  • 39. Feedback to user/Slow connection</li></li></ul><li>More Rendering Optimization Techniques<br />23<br /><ul><li>Scripts on bottom
  • 40. No CSS Expressions
  • 41. JavaScripts Asynchronously
  • 42. Multiple Hosts
  • 43. Ajax</li></li></ul><li>Performance Tools<br />24<br /><ul><li> Firebug / Page Speed / Hammerhead
  • 44. Yahoo! YSlow
  • 45. Page Speed
  • 46. SpeedTest.org</li>

×