BT

MIT's Polaris Touts Making Web Pages 34 Percent Faster

by Sergio De Simone on Mar 13, 2016 |

Polaris is a new JavaScript framework that aims to shrink Web pages load time by 34% at the median. Developed by researchers from MIT’s Computer Science and Artificial Intelligence Laboratory (CSAIL) and Harvard University, Polaris focuses on reducing latency associated to network trips.

In a paper that will be presented at next USENIX Symposium on Networked Systems Design and Implementation, MIT PhD student Ravi Netravali and others explain their new approach, which is based on two tools:

  • Scout, which is able to track the fine-grained data flows across the JavaScript heap and the DOM that arise during a page’s load process;
  • Polaris, a JavaScript client-side scheduler which leverages Scout graphs to assemble a page.

Dependency analysis is a technique commonly used by browsers to optimize the way they load resources. Before Scout, though, says Netravali, that kind of analysis was carried through based on lexical relationships between HTML tags, which missed many fine-grained dependencies, as it can be seen in the picture below for a real case.

Scout, on the other hand, strives to detect HTML-level dependencies, as well as dependencies among JavaScript files, and dependencies between JavaScript and DOM elements.

By providing a finer-grained dependency graph, Scout makes it possible for browsers to better schedule resource loading, and this is where the Polaris JavaScript scheduler comes into play. Polaris can run unmodified on common browsers and is able to calculate the dynamic critical load path for a page based on its Scout graph, which the server can bundle with the HTML page it serves together with Polaris itself. The dynamic critical load path, which by definition is the path which currently has the most unresolved objects, is different than the static load path as provided by Scout in that it is influenced by the order and latency with which network fetches complete.

Polaris prioritizes the fetching and evaluation of objects along the dynamic critical path, trying to make parallel use of the client’s CPU and network, and trying to keep the client’s network pipe full, given browser constraints on the maximum number of simultaneous network requests per origin.

The researchers behind Polaris tested their system under a range of network conditions, “with latencies ranging from 25ms to 500ms, and bandwidths ranging from 1Mbps to 25Mbps”, and on 200 popular websites. This showed, they say, a decrease by up to 34 percent at the median and 50% at the 95th percentile. Performance varied significantly across sites, being higher with complex pages and lower with pages making aggressive use of caching.

Rate this Article

Relevance
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss
General Feedback
Bugs
Advertising
Editorial
Marketing
InfoQ.com and all content copyright © 2006-2016 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT

We notice you’re using an ad blocker

We understand why you use ad blockers. However to keep InfoQ free we need your support. InfoQ will not provide your data to third parties without individual opt-in consent. We only work with advertisers relevant to our readers. Please consider whitelisting us.