Remediating Superfluous Re-Rendering in React ApplicationsDistinguished Paper Award
React is an extremely popular framework for constructing user interfaces (UIs). A React UI is organized as a tree of components, each of which is defined by a function that returns a literal written in JSX, a syntactic extension of JavaScript consisting of a combination of XML tags, executable JavaScript code, and references to sub-components. React supports incremental re rendering by maintaining an in-memory representation of a web page’s Document Object Model (DOM) and automatically calculating a set of minimal changes that must be applied to the DOM when state changes occur. However, React’s semantics are complex and subtle, and programmers often write code that gives rise to unnecessary re-rendering, which hurts performance and responsiveness. We identify 5 React anti-patterns that give rise to unnecessary re-rendering, present a static analysis for detecting them, and rewrite rules that suggest how to refactor the code to improve rendering performance. The static analysis is potentially unsound, so developers should carefully review the suggested refactorings. A survey of 7,758 React repositories showed that 92.1% of them exhibit at least one anti-pattern, and careful experimental evaluation on 23 React projects revealed that the suggested refactoring reduces the number of rendering operations by 33.3% on average while preserving application behavior in all but one case. With a small increase in code complexity, we find an average reduction in rendering time of 20.54%, and three case studies reveal that the refactorings can greatly improve application responsiveness as the number of components scales.
Wed 15 AprDisplayed time zone: Brasilia, Distrito Federal, Brazil change
11:00 - 12:30 | Evolution 1Journal-first Papers / Research Track at Oceania VIII Chair(s): Leopoldo Teixeira Federal University of Pernambuco | ||
11:00 15mTalk | Func: Reducing the impact of Android framework evolution on malware detection Journal-first Papers Hailong Yu Harbin Institute of Technology, Harbin Institute of Technology Zhengzhou Research Institute, Tiantian Wang Harbin Institute of Technology, Lwin Khin Shar Singapore Management University, Hanmeng Li Harbin Institute of Technology, David Lo Singapore Management University Media Attached | ||
11:15 15mTalk | Unraveling Code Clone Dynamics in Deep Learning Frameworks Journal-first Papers Maram Assi Université du Québec à Montréal, Safwat Hassan University of Toronto, Ying Zou Queen's University, Kingston, Ontario | ||
11:30 15mTalk | Remediating Superfluous Re-Rendering in React ApplicationsDistinguished Paper Award Research Track Farideh Khalili , Satyajit Gokhale Amazon, Alexi Turcotte CISPA, Dale Xu Boston University, Frank Tip Northeastern University | ||
11:45 15mTalk | Minimizing Breaking Changes and Redundancy in Mitigating Technical Lag for Java Projects Research Track Rui Lu East China Normal University, Lyuye Zhang Nanyang Technological University, Kaixuan Li Nanyang Technological University, Min Zhang East China Normal University, Yixiang Chen East China Normal University Pre-print | ||
12:00 15mTalk | CRUDinfer: Automated CRUD Semantics Inference for REST APIs Through Black-box Testing Research Track Michele Pasqua University of Verona, Davide Corradini University of Luxembourg, Michele Perlotto University of Naples, Mariano Ceccato University of Verona | ||
12:15 15mTalk | Diffploit: Facilitating Cross-Version Exploit Migration for Open Source Library Vulnerabilities Research Track Zirui Chen Zhejiang University, Zhipeng Xue Zhejiang University, Jiayuan Zhou Queen's University, Xing Hu Zhejiang University, Xin Xia Zhejiang University, Xiaohu Yang Zhejiang University Pre-print Media Attached | ||