神刀安全网

MIT's Polaris Touts Making Web Pages 34 Percent Faster

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.

MIT's Polaris Touts Making Web Pages 34 Percent Faster

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.

MIT's Polaris Touts Making Web Pages 34 Percent Faster

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.

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » MIT's Polaris Touts Making Web Pages 34 Percent Faster

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
分享按钮