Title
An extensible approach for taming the challenges of JavaScript dead code elimination
Abstract
JavaScript is becoming the de-facto programming language of the Web. Large-scale web applications (web apps) written in Javascript are commonplace nowadays, with big technology players (e.g., Google, Facebook) using it in their core flagship products. Today, it is common practice to reuse existing JavaScript code, usually in the form of third-party libraries and frameworks. If on one side this practice helps in speeding up development time, on the other side it comes with the risk of bringing dead code, i.e., JavaScript code which is never executed, but still downloaded from the network and parsed in the browser. This overhead can negatively impact the overall performance and energy consumption of the web app. In this paper we present Lacuna, an approach for JavaScript dead code elimination, where existing JavaScript analysis techniques are applied in combination. The proposed approach supports both static and dynamic analyses, it is extensible, and independent of the specificities of the used JavaScript analysis techniques. Lacuna can be applied to any JavaScript code base, without imposing any constraints to the developer, e.g., on her coding style or on the use of some specific JavaScript feature (e.g., modules). Lacuna has been evaluated on a suite of 29 publicly-available web apps, composed of 15,946 JavaScript functions, and built with different JavaScript frameworks (e.g., Angular, Vue.js, jQuery). Despite being a prototype, Lacuna obtained promising results in terms of analysis execution time and precision.
Year
DOI
Venue
2018
10.1109/SANER.2018.8330226
2018 IEEE 25th International Conference on Software Analysis, Evolution and Reengineering (SANER)
Keywords
Field
DocType
extensible approach,JavaScript dead code elimination,de-facto programming language,large-scale web applications,web app,Lacuna,existing JavaScript analysis techniques,JavaScript code base,coding style,specific JavaScript feature,publicly-available web apps,JavaScript functions
Dead code elimination,Programming language,Suite,Reuse,Computer science,Parsing,Web application,Extensibility,JavaScript,Dead code
Conference
ISBN
Citations 
PageRank 
978-1-5386-4970-1
1
0.37
References 
Authors
15
4
Name
Order
Citations
PageRank
Niels Groot Obbink110.37
Ivano Malavolta246849.69
Gian Luca Scoccia393.17
Patricia Lago41610120.48