Enabling Additional Parallelism in Asynchronous JavaScript Applications
Fri 16 Jul 2021 19:40 - 20:00 at ECOOP 2 - Parallelism / Runtimes (time band 1) Chair(s): Colin Gordon
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).
Fri 16 JulDisplayed time zone: Brussels, Copenhagen, Madrid, Paris change
08:00 - 09:00 | Empirical Studies / Parallelism (time band 3)ECOOP Technical Papers at ECOOP 1 Chair(s): Hakjoo Oh Korea University | ||
08:00 20mTalk | CodeDJ: Reproducible Queries over Large-Scale Software Repositories ECOOP Technical Papers Petr Maj Czech Technical University, Konrad Siek Czech Technical University in Prague, Jan Vitek Northeastern University / Czech Technical University, Alexander Kovalenko Czech Technical University in Prague DOI | ||
08:20 20mTalk | Enabling Additional Parallelism in Asynchronous JavaScript Applications ECOOP Technical Papers DOI | ||
08:40 20mTalk | Do Bugs Propagate? An Empirical Analysis of Temporal Correlations among Software Bugs ECOOP Technical Papers Xiaodong Gu Shanghai Jiao Tong University, China, Sunghun Kim Hong Kong University of Science and Technology, Yo-Sub Han Yonsei University, Hongyu Zhang University of Newcastle DOI |
19:00 - 20:00 | Parallelism / Runtimes (time band 1)ECOOP Technical Papers at ECOOP 2 Chair(s): Colin Gordon Drexel University | ||
19:00 20mTalk | Best-Effort Lazy Evaluation for Python Software Built On APIs ECOOP Technical Papers DOI | ||
19:20 20mTalk | Linear Promises: Towards Safer Concurrent Programming ECOOP Technical Papers Ohad Rau Georgia Institute of Technology, Caleb Voss Georgia Institute of Technology, Vivek Sarkar Georgia Institute of Technology DOI | ||
19:40 20mTalk | Enabling Additional Parallelism in Asynchronous JavaScript Applications ECOOP Technical Papers DOI |