Enabling Additional Parallelism in Asynchronous JavaScript Applications (Artifact)

Authors Ellen Arteca, Frank Tip, Max Schäfer



PDF
Thumbnail PDF

Artifact Description

DARTS.7.2.5.pdf
  • Filesize: 479 kB
  • 6 pages

Document Identifiers

Author Details

Ellen Arteca
  • Northeastern University, Boston, MA, USA
Frank Tip
  • Northeastern University, Boston, MA, USA
Max Schäfer
  • GitHub, Oxford, UK

Cite As Get BibTex

Ellen Arteca, Frank Tip, and Max Schäfer. Enabling Additional Parallelism in Asynchronous JavaScript Applications (Artifact). In Special Issue of the 35th European Conference on Object-Oriented Programming (ECOOP 2021). Dagstuhl Artifacts Series (DARTS), Volume 7, Issue 2, pp. 5:1-5:6, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2021) https://doi.org/10.4230/DARTS.7.2.5

Artifact

  MD5 Sum: 2004edb5b603c4c97d7bffae052939fa (Get MD5 Sum)

Abstract

JavaScript is a single-threaded programming language, so asynchronous programming is practiced out of necessity to ensure that applications remain responsive in the presence of user input or interactions with file systems and networks. However, many JavaScript applications execute in environments that do exhibit concurrency by, e.g., interacting with multiple or concurrent servers, or by using file systems managed by operating systems that support concurrent I/O. In this paper, we demonstrate that JavaScript programmers often schedule asynchronous I/O operations suboptimally, and that reordering such operations may yield significant performance benefits. Concretely, we define a static side-effect analysis that can be used to determine how asynchronous I/O operations can be refactored so that asynchronous I/O-related requests are made as early as possible, and so that the results of these requests are awaited as late as possible. While our static analysis is potentially unsound, we have not encountered any situations where it suggested reorderings that change program behavior. We evaluate the refactoring on 20 applications that perform file- or network-related I/O. For these applications, we observe average speedups ranging between 0.99% and 53.6% for the tests that execute refactored code (8.1% on average).

Subject Classification

ACM Subject Classification
  • Software and its engineering → Automated static analysis
  • Software and its engineering → Concurrent programming structures
  • Software and its engineering → Software performance
Keywords
  • asynchronous programming
  • refactoring
  • side-effect analysis
  • performance optimization
  • static analysis
  • JavaScript

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail