An Examination of the Run-time Performance of GUI Creation Frameworks Christopher J. Howell, Gregory M. Kapfhammer, Robert S. Roos Department of Computer Science Allegheny College Meadville, PA 16335 {howellc,gkapfham,rroos}@allegheny.edu ABSTRACT The graphical user interface (GUI) is an important com- ponent of many software systems. Past surveys indicate that the development of a GUI is a significant undertaking and that the GUI’s source code often comprises a substan- tial portion of the program’s overall source base. Graph- ical user interface creation frameworks for popular object- oriented programming languages enable the rapid construc- tion of simple and complex GUIs. In this paper, we examine the run-time performance of two GUI creation frameworks, Swing and Thinlet, that are tailored for the Java program- ming language. Using a simple model of a Java GUI, we formally define the difficulty of a GUI manipulation event. After implementing a case study application, we conducted experiments to measure the event handling latency for GUI manipulation events of varying difficulties. During our in- vestigation of the run-time performance of the Swing and Thinlet GUI creation frameworks, we also measured the CPU and memory consumption of our candidate applica- tion during the selected GUI manipulation events. Our ex- perimental results indicate that Thinlet often outperformed Swing in terms of both event handling latency and memory consumption. However, Swing appears to be better suited, in terms of event handling latency and CPU consumption, for the construction of GUIs that require manipulations of high difficulty levels. 1. INTRODUCTION The performance of interactive systems is a significant part of a user’s perception of overall system performance. For an application to be successful, a user must possess the ability to interact with the application easily. A graphical user interface (GUI) is one mechanism to allow easy inter- action between the user and the application. While past estimates indicated that an average of 48% of an applica- tion’s source code was devoted to the interface [18], current reports reveal that the GUI represents 60% of the overall Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. 2nd International Conference on the Principles and Practice of Program- ming in Java 2003 Kilkenny City, Ireland Copyright 2003 ACM X-XXXXX-XX-X/XX/XX ...$5.00. source of a program [13]. Graphical user interface toolkits (or, alternatively, GUI creation frameworks) facilitate the construction of interfaces by providing a set of graphical widgets and a mechanism for combining these widgets into a complete GUI [17, 18]. GUI creation frameworks do not solve all of the prob- lems that are associated with the construction of software systems that have interfaces. Indeed, additional techniques have been proposed and implemented to address the issues of GUI correctness [14, 16], GUI usability and widget layout [19], interactive system performance [5], and the analysis of the correctness and performance of the underlying applica- tion [8, 21]. Even though the performance of interactive systems is clearly important [7, 20], relatively little research has specifically focused on the measurement and comparison of the run-time performance of GUI creation frameworks. Since a GUI is an important component of most software applications and a GUI toolkit is often used to construct the interface, it is clearly important to develop an understanding of the performance of current GUI creation frameworks. According to Horgan et al. [9], the analysis of Java pro- grams can be broken into at least four levels, namely (1) stat- ically, at the source code level; (2) statically, at the bytecode level; (3) dynamically, at the bytecode level; and (4) dynam- ically, on a specific virtual machine and architecture. In this paper, we focus on the fourth level by analyzing the perfor- mance of GUI creation frameworks on a specific Java Virtual Machine (JVM) and selected computer architectures. Using a case-study application, we experiment with two frame- works from the perspective of the user by comparing the event handling latency and CPU and memory consumption for events of increasing levels of difficulty. The contributions of this paper are: 1. The definition of the difficulty of a GUI manipulation event. 2. A detailed empirical analysis and comparison of the run-time performance of two Java GUI creation frame- works, Swing [12] and Thinlet [1]. 3. Recommendations concerning the selection of a suit- able GUI creation framework for classes of interactive applications. The remainder of this paper is organized in the follow- ing manner. In Section 2 we use a simple definition of a graphical user interface to define the difficulty of a GUI ma- nipulation event and review the concept of event handling