Concurrent Java']JavaScript Parsing for Faster Loading of Web Apps

被引:6
|
作者
Park, Hyukwoo [1 ]
Cha, Myungsu [1 ]
Moon, Soo-Mook [1 ]
机构
[1] Seoul Natl Univ, Dept Elect & Comp Engn, Seoul 08826, South Korea
关键词
!text type='Java']Java[!/text]Script; web app; parser; concurrent parsing; web browser; !text type='java']java[!/text]script engine;
D O I
10.1145/3004281
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
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 theWebKit 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.
引用
收藏
页数:24
相关论文
共 50 条
  • [41] Analysis of Java']JavaScript Web Applications Using SAFE 2.0
    Park, Jihyeok
    Ryou, Yeonhee
    Park, Joonyoung
    Ryu, Sukyoung
    PROCEEDINGS OF THE 2017 IEEE/ACM 39TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING COMPANION (ICSE-C 2017), 2017, : 59 - 62
  • [42] Using Speculation to Enhance Java']JavaScript Performance in Web Applications
    Martinsen, Jan Kasper
    Grahn, Hakan
    Isberg, Anders
    IEEE INTERNET COMPUTING, 2013, 17 (02) : 10 - 19
  • [43] Breaking Bad: Quantifying the Addiction of Web Elements to Java']JavaScript
    Fouquet, Romain
    Laperdrix, Pierre
    Rouvoy, Romain
    ACM TRANSACTIONS ON INTERNET TECHNOLOGY, 2023, 23 (01)
  • [44] Advances in Testing Java']JavaScript-Based Web Applications
    Mesbah, Ali
    ADVANCES IN COMPUTERS, VOL 97, 2015, 97 : 201 - 235
  • [45] Designing with Java']JavaScript: Creating dynamic Web pages.
    Brooks, TA
    JOURNAL OF THE AMERICAN SOCIETY FOR INFORMATION SCIENCE AND TECHNOLOGY, 2002, 53 (11): : 967 - 968
  • [46] Journey to Find Bugs in Java']JavaScript Web Applications in the Wild
    Ryu, Sukyoung
    ACM SIGPLAN NOTICES, 2016, 51 (09) : 2 - 2
  • [47] Analyzing Java']JavaScript Web Applications in the Wild (Mostly) Statically
    Ryu, Sukyoung
    PROGRAMMING LANGUAGES AND SYSTEMS, APLAS 2015, 2015, 9458 : XII - XIV
  • [48] Keep Me Updated: An Empirical Study on Embedded Java']JavaScript Engines in Android Apps
    Wen, Elliott
    Zhou, Jiaxiang
    Luo, Xiapu
    Russello, Giovanni
    Dietrich, Jens
    2024 IEEE/ACM 21ST INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES, MSR, 2024, : 361 - 372
  • [49] Freezing the Web: A Study of ReDoS Vulnerabilities in Java']JavaScript-based Web Servers
    Staicu, Cristian-Alexandru
    Pradel, Michael
    PROCEEDINGS OF THE 27TH USENIX SECURITY SYMPOSIUM, 2018, : 361 - 376
  • [50] Dynamic web worker pool management for highly parallel java']javascript web applications
    Verdu, Javier
    Jose Costa, Juan
    Pajuelo, Alex
    CONCURRENCY AND COMPUTATION-PRACTICE & EXPERIENCE, 2016, 28 (13): : 3525 - 3539