Affiliation:
1. Seoul National University, Seoul, Republic of Korea
Abstract
JavaScript
is a dynamic language mainly used as a client-side web script. Nowadays, web is evolving into an application platform with its
web apps
, and JavaScript increasingly undertakes complex computations and interactive user interfaces, requiring a high-performance JavaScript engine. There have been many optimizations for efficient JavaScript engines, but one component that has not been optimized much is
JavaScript parsing
. A JavaScript function needs to be parsed before being executed, and the parsing overhead takes a substantial portion of JavaScript execution time for web apps, especially during
app loading
. This article proposes
concurrent parsing
of JavaScript, which performs the parsing of JavaScript functions in advance on different threads, while the main thread is executing the parsed JavaScript functions. This can hide the parsing overhead from the main execution thread, reducing the JavaScript execution time, thus reducing the overall app loading time. More specifically, we separated JavaScript parsing and made it run on different threads without violating the execution semantics of JavaScript. We also designed an efficient multi-threaded parsing architecture, which reduces the synchronization overhead and schedules the parsing requests appropriately. Finally, we explored two methods of choosing the target functions for concurrent parsing: one based on profiled information and the other based on speculative heuristics. We performed experiments on the WebKit browser with the JSC engine for real web apps. The result shows that the proposed concurrent parsing can improve the JavaScript performance during app loading by as much as 64% and by 39.7% on average. This improves the whole app loading performance tangibly, by as much as 32.7% and by 18.2%, on average.
Funder
Electronics and Telecommunications Research Institute
Institute for Information 8 communications Technology Promotion
Ministry of Trade, Industry 8 Energy
Korea government
Publisher
Association for Computing Machinery (ACM)
Subject
Hardware and Architecture,Information Systems,Software
Cited by
3 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Parsing millions of URLs per second;Software: Practice and Experience;2023-12-09
2. Innovations in courts: Validation of a scale of technological innovation;Revista de Gestão e Secretariado;2022-12-30
3. Accelerating web application loading with snapshot of event and DOM handling;Proceedings of the 28th International Conference on Compiler Construction - CC 2019;2019