1 / 19

A Faster FasterFox?

A Faster FasterFox?. David Backeberg and Remo Mueller. Firefox “Out of the Box”. Memory cache set proportional to system ram Disk cache set to default value (76,800 KiB) “Prefetching” enabled: network.prefetch-next set to true. Browser content caching.

Télécharger la présentation

A Faster FasterFox?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Faster FasterFox? David Backeberg and Remo Mueller

  2. Firefox “Out of the Box” • Memory cache set proportional to system ram • Disk cache set to default value (76,800 KiB) • “Prefetching” enabled: network.prefetch-next set to true

  3. Browser content caching • HTTP/1.1 200 OK Date: Fri, 30 Oct 1998 13:19:41 GMT Server: Apache/1.3.3 (Unix) Cache-Control: max-age=3600, must-revalidate Expires: Fri, 30 Oct 1998 14:19:41 GMT Last-Modified: Mon, 29 Jun 1998 02:28:12 GMT Content-Length: 1040 Content-Type: text/html • HTML also supports tags involving caching. Not necessarily honored by browsers. • <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">

  4. Everyone wins • Browser doesn’t have to grab something it already has • Server / client don’t waste bandwidth on redundant content • User thinks website is “faster”, more likely to make return visits to website

  5. Firefox Extensions (.xpi) • Third-party applications that use Firefox library functions to accomplish some task • Examples • Forecastfox (weather info on toolbar) • Flashgot (replaces Firefox download ability with richer functions)

  6. Firefox prefetching • Firefox extends HTML link tag • <link rel="prefetch" href="mozspecific.css"> <link rel="next" href="2.html"> • This method isn’t forbidden, it merely creates a new kind of “relation”, permitted by HTTP 1.1 • If “rel” is “prefetch” or “next”, Firefox will prefetch the page(s)

  7. Firefox Prefetching • Prefetching only uses “idle” bandwidth • We put “idle” in quotes because the browser can’t tell what else is going on with network activity in other system applications or daemons • Once all tabs or pages are loaded, Mozilla will grab explicitly tagged content

  8. Firefox Prefetching • Prefetched content ends up in disk-cache. • Prefetching makes the cache more relevant, and “fresher” than it would be without prefetching • User has illusion of faster browsing

  9. Firefox settings • Settings can be viewed and changed with about:config • These settings can also be changed with prefs.js in user’s directory • Cache contents and settings can be viewed with about:cache

  10. Firefox internals • Individual functions (library calls) within Firefox can be put into debug mode • Under linux:$export NSPR_LOG_MODULES=nsHttp:5,nsSocketTransport:5,nsHostResolver:5, nsPrefetch:5$export NSPR_LOG_FILE=/home/dave/eecs428/fasterfox/http.log$firefox • In this manner we could get a log of whether prefetching was working • Examined cache using about:cache • Recorded page load times

  11. Fasterfox • An .xpi-based extension of Firefox • Uses Firefox library calls to provide richer prefetching and caching abilities • Also “tweaks” page rendering techniques to display content faster • Tunable “aggressiveness”

  12. Fasterfox Settings • Some settings are just user-friendly GUIs for changing settings buried in about:config

  13. Fasterfox Settings • Other settings are genuine extensions of the way Firefox downloads pages

  14. Enhanced Prefetching • Doesn’t restrict prefetching to rel=next, rel=prefetch links • Index up to 100 links on a page, prefetch all of those, as long as they look like static content • Try not to prefetch a “logout” or “empty my shopping cart” button

  15. Enhanced Prefetching • Very good odds of user clicking a cached page, and that cached version being up-to-date • Also good odds of cache containing data that won’t be viewed by user • Arguably, for a site the user visits heavily, this could still mean everybody wins

  16. How We've Modified Fasterfox: • Fasterfox now keeps track of how long it took to visit each page. After running a test series, we can gather all the information and perform an analysis of it. • We also changed the content that is grabbed in Fasterfox

  17. Timings screenshot

  18. How to Enhance Fasterfox • Prioritized Prefetching (Fasterfox currently uses a fifo queue, ordered by the link’s location on a page) • Global System view of bandwidth; prefetch only when system idle? • Gentler prefetching mechanism? Prefetching uses ordinary HTTP GET. Perhaps a PREGET? • User Customization • Different user types • User selects, or artificial intelligence to figure out what type the user is. • Cache hit rate percentage (prove that prefetching is really making the cache more relevant)

  19. References: • Firefox Link Prefetching FAQhttp://www.mozilla.org/projects/netlib/Link_Prefetching_FAQ.html • Fasterfox source codehttp://fasterfox.mozdev.org/ • Mozilla HTTP Debugging guidehttp://www.mozilla.org/projects/netlib/http/http-debugging.html • Assertion: Prefetching With GET Is Not Good, Brian Davison. Proceedings of the Sixth International Web Content Caching and Content Distribution Workshop (WCW'01), Boston, June 20-22, 2001, pages 203-215. Available online: http://www.cse.lehigh.edu/~brian/pubs/2001/wcw/wcw01.pdf

More Related