Performance Issues and Optimizations in JavaScript: An Empirical Study

Author(s): Marija Selakovic, Michael Pradel
Venue: 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE)
Date: 2016

Type of Experiement: Survey/Multi-Case Study
Sample Size: 98
Class/Experience Level: Graduate Student, Professional
Participant Selection: Issues from 16 different software projects with bug-tracking
Data Collection Method: Observation


Since Javascript is being used more and more nowadays for its responsiveness and energy efficient characteristics, it would be wise to find common patterns or that can increase or decrease performance and optimization. Identifying these patterns would help future developers and researchers create better Javascript applications. That is what Selakovic and Pradel aim to achieve in this study of 98 fixed optimization issues across 16 client-side and server-side Javascript projects.

The study focused on 4 main questions: what was the root cause of common performance issues, how complex was the change needed to fix the issue, how much of a performance impact was seen after the fix, how did the performance change across different engines and was the pattern applicable to other problems.

From the 98 issues that the authors studied, they found that the most common cause of performance issues was inefficient use of Javascript provided APIs. Apparently Javascript provided a large number of APIs that have the same behavior but different performance and this suggests that in the future more guidance about which is the correct API to use in a particular situation or to cut down on the overall number of APIs.

The next question they addressed was that most changes were were small enough to not affect the complexity of the overall project. And they also found that most optimization patterns could be applied frequently within the same project.

Overall, this study provided an indepth look into what performance issues can potentially happen as well as provide a detailed analysis of how performance fixes can help in the future.