Horcrux: Automatic JavaScript parallelism for resource-efficient web computation

Shaghayegh Mardani, Ayush Goel, Ronny Ko, Harsha V. Madhyastha, Ravi Netravali

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Web pages today commonly include large amounts of JavaScript code in order to offer users a dynamic experience. These scripts often make pages slow to load, partly due to a fundamental inefficiency in how browsers process JavaScript content: browsers make it easy for web developers to reason about page state by serially executing all scripts on any frame in a page, but as a result, fail to leverage the multiple CPU cores that are readily available even on low-end phones. In this paper, we show how to address this inefficiency without requiring pages to be rewritten or browsers to be modified. The key to our solution, Horcrux, is to account for the non-determinism intrinsic to web page loads and the constraints placed by the browser’s API for parallelism. Horcrux-compliant web servers perform offline analysis of all the JavaScript code on any frame they serve to conservatively identify, for every JavaScript function, the union of the page state that the function could access across all loads of that page. Horcrux’s JavaScript scheduler then uses this information to judiciously parallelize JavaScript execution on the client-side so that the end-state is identical to that of a serial execution, while minimizing coordination and offloading overheads. Across a wide range of pages, phones, and mobile networks covering web workloads in both developed and emerging regions, Horcrux reduces median browser computation delays by 31-44% and page load times by 18-37%.

Original languageEnglish (US)
Title of host publicationProceedings of the 15th USENIX Symposium on Operating Systems Design and Implementation, OSDI 2021
PublisherUSENIX Association
Pages461-477
Number of pages17
ISBN (Electronic)9781939133229
StatePublished - 2021
Event15th USENIX Symposium on Operating Systems Design and Implementation, OSDI 2021 - Virtual, Online
Duration: Jul 14 2021Jul 16 2021

Publication series

NameProceedings of the 15th USENIX Symposium on Operating Systems Design and Implementation, OSDI 2021

Conference

Conference15th USENIX Symposium on Operating Systems Design and Implementation, OSDI 2021
CityVirtual, Online
Period7/14/217/16/21

All Science Journal Classification (ASJC) codes

  • Computer Networks and Communications
  • Hardware and Architecture
  • Information Systems

Fingerprint

Dive into the research topics of 'Horcrux: Automatic JavaScript parallelism for resource-efficient web computation'. Together they form a unique fingerprint.

Cite this