Horcrux: Automatic JavaScript Parallelism for Resource-Efficient Web Computation
Shaghayegh Mardani, Ayush Goel, Ronny Ko, Harsha V. Madhyastha, Ravi Netravali
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%.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext e6583e97-6cba-4511-8c64-129bfc45d7bfBuilds on4
- Perspective: A Sensible Approach to Speculative Automatic ParallelizationSotiris Apostolakis, Ziyang Xu, Greg Chan, Simone Campanoni et al.ASPLOS 2020 · 19 citations
- Oblique: Accelerating Page Loads Using Symbolic ExecutionRonny Ko, James Mickens, Blake Loring, Ravi NetravaliNSDI 2021 · 13 citations
- Fawkes: Faster Mobile Page Loads via App-Inspired Static TemplatingShaghayegh Mardani, Mayank Singh, Ravi NetravaliNSDI 2020 · 13 citations
- Alohamora: Reviving HTTP/2 Push and Preload by Adapting Policies On the FlyNikhil Kansal, Murali Ramanujam, Ravi NetravaliNSDI 2021 · 10 citations
Related papers
- JSCleaner: De-Cluttering Mobile Webpages Through JavaScript CleanupMoumena Chaqfeh, Yasir Zaki, Jacinta Hu, Lakshmi SubramanianWWW 2020 · 33 citations
- JSISOLATE: lightweight in-browser JavaScript isolationMingxue Zhang, Wei MengFSE 2021 · 9 citations
- ScriptChecker: To Tame Third-party Script Execution With Task CapabilitiesWu Luo, Xuhua Ding, Pengfei Wu, Xiaolei Zhang et al.NDSS 2022
- Increasing the Responsiveness of Web Applications by Introducing Lazy LoadingAlexi Turcotte, Satyajit Gokhale, Frank TipASE 2023 · 3 citations
- Jawa: Web Archival in the Era of JavaScriptAyush Goel, Jingyuan Zhu, Ravi Netravali, Harsha V. MadhyasthaOSDI 2022
