The One True Way to Make Your Web Applications Quicker

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

Post a comment
Embed Video
Edit your comment Cancel

8 Favorites & 1 Group

The One True Way to Make Your Web Applications Quicker - Presentation Transcript

  1. The One True Way to Make Your Web Apps Quicker! Vishnu Gopal
  2. Me • Born and brought up a Keralite. Mallu. • Worked in the Mobile VAS sector, founded Torque, torque.co.in • Uzanto & SlideShare • www.vish.in
  3. Lots of Ways Lots of Approaches • Profiling Code • Faster App Server • Using AJAX/COMET • Output Compression • Caching • A Stateful System • Better Hardware • A better web language • Not using Rich Media • Optimizing images
  4. Low Hanging Fruit • Club into three categories: • Improve your code • Easy at first, then very hard. • Improve your dependencies • Most often impossible to do
  5. Low Hanging Fruit • Improve your hardware • Only Rich People will build Rich Internet Applications. • One thing in the list quite doesn’t fit
  6. Intelligent Caching works wonders Caching: The Holy Grail
  7. Lots of Ways Lots of Approaches • Profiling Code • Faster App Server • Using AJAX/COMET • Output Compression • Caching • A Stateful System • Better Hardware • A better web language • Not using Rich Media • Optimizing images
  8. Interlude One A bit of a treat
  9. Performance Testing • http_load, ab, httperf, ... • httperf --num-conns=x --rate=y -- host=localhost --uri=/ • Measure a page which is a good indicator of your app (your home page would be nice)
  10. Interlude Two Testing
  11. How do I? • Talking framework/language/platform agnostic • I’ll focus on Rails, but generalizations are easy to come by • Caching fragments • Memcached
  12. Fragment Caching • Assemble Portions of a Page • Reduce Computation • Lovely Rails idiom • <% cache params, expiry do %> and <% end %> around the block.
  13. Page Caching • Cache the whole page • Serve as static HTML by a frontend webserver bypassing all framework code • Blazingly fast • Dynamic portions unique to a user are a problem
  14. Page Caching Reloaded • Works for dynamic pages • Reasonable amount of user-specific content • Axiom: • The meat of a page is never its navigation: and content is usually not user-specific. • Why sacrifice speed for navigation?
  15. Solution • Load navigation dynamically after page load • The page loads, the content is displayed and unobtrusive changes are made for personalization • Target areas: high traffic areas of a webapp where page caching will be uber cool
  16. Implementation • hInclude • Lighttpd • Lua (scripting lang like Ruby, Python, but FAST) • Memcached
  17. hInclude • <hx:include src="/src/to/dynamic- content"></hx:include> • Uses Javascript to load dynamic content in the background and update. • Seamless for small updates (feels like page loading)
  18. So Cache Away! • Convert partials to a dummy action: • def personal • render :partial => 'top_bar/show' • end. • Call that using hInclude • Activate Page Caching, and..
  19. Interlude Three Magic
  20. What did we do? • Slow to Fast • Caching is a lower hanging fruit: It’s easy to do • Surprisingly good results • hInclude small dynamic portions for really fast pages
  21. Limitations • Usability: Don’t surprise the user with randomly changing content. • An elegant way to clean page caches would be nice. • Another javascript library!
  22. Finis Questions?

+ vishnuvishnu, 3 years ago

custom

3446 views, 8 favs, 2 embeds more stats

My presentation at Barcamp Delhi 2

More Info

© All Rights Reserved

Go to text version
  • Total Views 3446
    • 3415 on SlideShare
    • 31 from embeds
  • Comments 1
  • Favorites 8
  • Downloads 0
Most viewed embeds
  • 30 views on http://vysnu.com
  • 1 views on http://www.vysnu.com

more

All embeds
  • 30 views on http://vysnu.com
  • 1 views on http://www.vysnu.com

less

Flagged as inappropriate Flag as inappropriate
Flag as innappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel

Categories

Groups / Events