Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1109/ICSE-Companion.2019.00069acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

JSOptimizer: an extensible framework for JavaScript program optimization

Published: 25 May 2019 Publication History

Abstract

JavaScript has become a popular programming language.1 It is widely used in both client-side and server-side programming in web applications. The robustness and performance of JavaScript programs become vital. Unfortunately, real-world JavaScript programs often suffer from various issues. In this work, we present nine issue patterns derived from open-source projects and propose a general static analysis framework, JSOptimizer, to help detect such patterns of issues and optimize the code accordingly. Comparing to existing work, JSOptimizer is not only highly extensible but also performs code optimizations automatically. We applied JSOptimizer to seven real open-source JavaScript projects and five bugs detected by it have been confirmed by developers. Besides, we conducted a case study based on a popular project and found that addressing the issues detected by our framework can speed up the original project by over 300%. This shows the usefulness of JSOptimizer.

References

[1]
M. Selakovic and M. Pradel, "Performance issues and optimizations in javascript: an empirical study," in Proceedings of the 38th International Conference on Software Engineering. ACM, 2016, pp. 61--72.
[2]
M. Pradel, P. Schuh, G. Necula, and K. Sen, "Eventbreak: Analyzing the responsiveness of user interfaces through performance-guided test generation," in ACM SIGPLAN Notices, vol. 49, no. 10. ACM, 2014, pp. 33--47.
[3]
"Node.js® is a javascript runtime built on chrome's v8 javascript engine." https://nodejs.org/en/.
[4]
L. Nkenyereye and J.-W. Jang, "Performance evaluation of server-side javascript for healthcare hub server in remote healthcare monitoring system," Procedia Computer Science, vol. 98, pp. 382 -- 387, 2016, the 7th International Conference on Emerging Ubiquitous Systems and Pervasive Networks (EUSPN 2016)/The 6th International Conference on Current and Future Trends of Information and Communication Technologies in Healthcare (ICTH-2016)/AffiliatedWorkshops. {Online}. Available: http://www.sciencedirect.com/science/article/pii/S1877050916322037
[5]
W. O. da Silva and P. R. Farah, "Characteristics and performance assessment of approaches pre-rendering and isomorphic javascript as a complement to spa architecture," in Proceedings of the VII Brazilian Symposium on Software Components, Architectures, and Reuse, ser. SBCARS '18. New York, NY, USA: ACM, 2018, pp. 63--72. {Online}. Available
[6]
"React - a javascript library for building user interfaces," https://reactjs.org/.
[7]
N. C. Zakas, High Performance JavaScript - Build Faster Web Application Interfaces. O'Reilly, 2010. {Online}. Available: http://www.oreilly.de/catalog/9780596802790/index.html
[8]
T. H. Tan, Y. Xue, M. Chen, S. Liu, Y. Yu, and J. Sun, "Jsfox: integrating static and dynamic type analysis of javascript programs," in Software Engineering Companion (ICSE-C), 2017 IEEE/ACM 39th International Conference on. IEEE, 2017, pp. 256--258.
[9]
M. Madsen, B. Livshits, and M. Fanning, "Practical static analysis of javascript applications in the presence of frameworks and libraries," in Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering. ACM, 2013, pp. 499--509.
[10]
"Eslint - the pluggable linting utility for javascript and jsx," https://eslint.org/.
[11]
"aetherjs - lint, analyze, normalize, transform, sandbox, run, step through, and visualize user javascript, in node or the browser." https://github.com/codecombat/aether.
[12]
"Jslint, the javascript code quality tool. this file allows jslint to be run from a web browser. it can accept a source program and analyze it without sending it over the network." https://jslint.com/.
[13]
V. Kashyap, K. Dewey, E. A. Kuefner, J. Wagner, K. Gibbons, J. Sarracino, B. Wiedermann, and B. Hardekopf, "Jsai: A static analysis platform for javascript," in Proceedings of the 22Nd ACM SIGSOFT
[14]
G. Lóki and P. Gál, "Javascript guidelines for javascript programmers - A comprehensive guide for performance critical JS International Symposium on Foundations of Software Engineering, ser. FSE 2014. New York, NY, USA: ACM, 2014, pp. 121--132. {Online}. Available
[15]
J. A. Pienaar and R. Hundt, "Jswhiz: Static analysis for javascript memory leaks," in Proceedings of the 2013 IEEE/ACM International Symposium on Code Generation and Optimization, CGO 2013, Shenzhen, China, February 23--27, 2013, 2013, pp. 11:1--11:11. {Online}. Available
[16]
C. Park, H. Lee, and S. Ryu, "Static analysis of javascript libraries in a scalable and precise way using loop sensitivity," Softw., Pract. Exper., vol. 48, no. 4, pp. 911--944, 2018. {Online}. Available
[17]
J. Park, I. Lim, and S. Ryu, "Battles with false positives in static analysis of javascript web applications in the wild," in Proceedings of the 38th International Conference on Software Engineering, ICSE 2016, Austin, TX, USA, May 14--22, 2016 - Companion Volume, 2016, pp. 61--70. {Online}. Available
[18]
C. Park, S. Won, J. Jin, and S. Ryu, "Static analysis of javascript web applications in the wild via practical DOM modeling (T)," in 30th IEEE/ACM International Conference on Automated Software Engineering, ASE 2015, Lincoln, NE, USA, November 9--13, 2015, 2015, pp. 552--562. {Online}. Available programs," in Proceedings of the 13th International Conference on Software Technologies, ICSOFT 2018, Porto, Portugal, July 26--28, 2018., 2018, pp. 431--438. {Online}. Available:
[19]
"webpack," https://webpack.js.org/.
[20]
"jsoptimizer," https://github.com/sumleo/jsoptimizer.
[21]
"Webgl-accelerated ml // linear algebra // automatic differentiation for javascript. - tensorflow/tfjs-core." https://github.com/tensorflow/tfjs-core.
[22]
"jsperf --- javascript performance playground," https://jsperf.com/.
[23]
"Github - denoland/deno: A secure typescript runtime on v8," https://github.com/denoland/deno.
[24]
"Calypso," https://github.com/Automattic/wp-calypso/.
[25]
J. F. Santos, P. Maksimovic, T. Grohens, J. Dolby, and P. Gardner, "Symbolic execution for javascript," in Proceedings of the 20th International Symposium on Principles and Practice of Declarative Programming, PPDP 2018, Frankfurt am Main, Germany, September 03--05, 2018, 2018, pp. 11:1--11:14. {Online}. Available
[26]
K. Sen, S. Kalasapur, T. G. Brutch, and S. Gibbs, "Jalangi: a tool framework for concolic testing, selective record-replay, and dynamic analysis of javascript," in Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE'13, Saint Petersburg, Russian Federation, August 18--26, 2013, 2013, pp. 615--618. {Online}. Available

Cited By

View all
  • (2023)Development and implementation of a blood donor management systemProceedings of the 2023 11th International Conference on Computer and Communications Management10.1145/3617733.3617734(1-5)Online publication date: 4-Aug-2023
  • (2022)Web Cryptography API: Prevalence and Possible Developer MistakesProceedings of the 17th International Conference on Availability, Reliability and Security10.1145/3538969.3538977(1-10)Online publication date: 23-Aug-2022

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
ICSE '19: Proceedings of the 41st International Conference on Software Engineering: Companion Proceedings
May 2019
369 pages

Sponsors

Publisher

IEEE Press

Publication History

Published: 25 May 2019

Check for updates

Author Tags

  1. JavaScript
  2. client-side
  3. server-side
  4. static analysis
  5. web applications

Qualifiers

  • Research-article

Conference

ICSE '19
Sponsor:

Acceptance Rates

Overall Acceptance Rate 276 of 1,856 submissions, 15%

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)5
  • Downloads (Last 6 weeks)1
Reflects downloads up to 13 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2023)Development and implementation of a blood donor management systemProceedings of the 2023 11th International Conference on Computer and Communications Management10.1145/3617733.3617734(1-5)Online publication date: 4-Aug-2023
  • (2022)Web Cryptography API: Prevalence and Possible Developer MistakesProceedings of the 17th International Conference on Availability, Reliability and Security10.1145/3538969.3538977(1-10)Online publication date: 23-Aug-2022

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media