License: Creative Commons Attribution 4.0 International license (CC BY 4.0)
When quoting this document, please refer to the following
DOI: 10.4230/DARTS.7.2.5
URN: urn:nbn:de:0030-drops-140290
URL: http://dagstuhl.sunsite.rwth-aachen.de/volltexte/2021/14029/
Go back to Dagstuhl Artifacts Series


Arteca, Ellen ; Tip, Frank ; Schäfer, Max

Enabling Additional Parallelism in Asynchronous JavaScript Applications (Artifact)

pdf-format:
DARTS-7-2-5.pdf (0.5 MB)


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).

BibTeX - Entry

@Article{arteca_et_al:DARTS.7.2.5,
  author =	{Arteca, Ellen and Tip, Frank and Sch\"{a}fer, Max},
  title =	{{Enabling Additional Parallelism in Asynchronous JavaScript Applications (Artifact)}},
  pages =	{5:1--5:6},
  journal =	{Dagstuhl Artifacts Series},
  ISSN =	{2509-8195},
  year =	{2021},
  volume =	{7},
  number =	{2},
  editor =	{Arteca, Ellen and Tip, Frank and Sch\"{a}fer, Max},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/opus/volltexte/2021/14029},
  URN =		{urn:nbn:de:0030-drops-140290},
  doi =		{10.4230/DARTS.7.2.5},
  annote =	{Keywords: asynchronous programming, refactoring, side-effect analysis, performance optimization, static analysis, JavaScript}
}

Keywords: asynchronous programming, refactoring, side-effect analysis, performance optimization, static analysis, JavaScript
Collection: DARTS, Volume 7, Issue 2, Special Issue of the 35th European Conference on Object-Oriented Programming (ECOOP 2021)
Related Scholarly Article: https://doi.org/10.4230/LIPIcs.ECOOP.2021.7
Issue Date: 2021
Date of publication: 06.07.2021


DROPS-Home | Fulltext Search | Imprint | Privacy Published by LZI