Enabling Additional Parallelism in Asynchronous JavaScript Applications (Artifact)
Autor: | Arteca, Ellen, Tip, Frank, Schäfer, Max |
---|---|
Jazyk: | angličtina |
Rok vydání: | 2021 |
Předmět: | |
DOI: | 10.4230/darts.7.2.5 |
Popis: | 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). DARTS, Vol. 7, Special Issue of the 35th European Conference on Object-Oriented Programming (ECOOP 2021), pages 5:1-5:6 |
Databáze: | OpenAIRE |
Externí odkaz: |