Journal of Computer Science and Technology

   

Understanding and Detecting Inefficient Image Displaying Issues in Android Apps

Wen-Jie Li1,2(李文杰), Jun Ma1,2,*(马骏), Member, CCF, ACM, IEEE, Yan-Yan Jiang1,2(蒋炎岩), Member, CCF, ACM, Chang Xu1,2(许畅), Member, ACM, Senior Member, CCF, IEEE, and Xiao-Xing Ma1,2(马晓星), Member, CCF, ACM   

  1. 1State Key Laboratory of Novel Software Technology, Nanjing University, Nanjing 210023, China
    2Department of Computer Science and Technology, Nanjing University, Nanjing 210023, China

Mobile applications (apps for short) often need to display images. However, inefficient image displaying (IID) issues are pervasive in mobile apps, and can severely impact app performance and user experience. This paper first establishes a descriptive framework for the image displaying procedures of IID issues. Based on the descriptive framework, we conduct an empirical study of 216 real-world IID issues collected from 243 popular open-source Android apps to validate the presence and severity of IID issues, and then shed light on these issues' characteristics to support research on effective issue detection. With the findings of this study, we propose a static IID issue detection tool TAPIR and evaluate it with 243 real-world Android apps. Encouragingly, 49 and 64 previously-unknown IID issues in two different versions of 16 apps reported by TAPIR are manually confirmed as true positives, and 16 previously-unknown IID issues reported by TAPIR have been confirmed by developers and 13 have been fixed. Then, we further evaluate the performance impact of these detected IID issues and the performance improvement if they are fixed. The results demonstrate that the IID issues detected by TAPIR indeed cause significant performance degradation, which further show the effectiveness and efficiency of TAPIR.


中文摘要

1、 研究背景
智能手机和平板电脑等移动设备已成为人们日常生活中不可或缺的一部分。这些移动设备中所使用到的媒体密集型应用程序在功能上越来越丰富,经常包含涉及高CPU和内存消耗的图像显示功能。如果应用程序开发者在图像显示功能上存在低效的实现,将使得应用程序中存在低效图像显示(inefficient image displaying, IID)问题,导致应用程序崩溃、UI响应滞后、内存膨胀或电量耗尽,使得用户体验会受到显著影响,甚至最终导致用户放弃并卸载应用程序。因此,我们需要对IID问题的特征有充分的理解,同时开发自动化的IID问题检测工具。但是,而在现有研究工作中,还不存在专门对IID问题进行系统性分析和自动检测的工作。
2、 目的(Objective)
移动应用程序通常需要显示图像。然而,IID问题在移动应用程序中普遍存在,并严重影响应用程序的性能。
我们的研究目标包括:(1)分析Android应用程序中IID问题的特点是什么,(2)研究如何自动化地检测Android应用程序中的IID问题。
3、 方法(Method)
首先,本文构造了一个用来描述IID问题的描述框架。在描述框架中,每一个IID问题由四个部分来刻画:1)问题的触发条件,2)问题造成的后果,3)带有功能模块标注的图片处理代码切片,以及4)问题原因的描述。
其次,本文从github、F_Droid和Google Play中收集Android应用程序和这些应用程序中的IID问题,并基于描述框架得到这些IID问题的带有功能模块标注的图片处理代码切片。
第三,我们研究IID问题的带有功能模块标注的图片处理代码切片,以回答四个问题:
       RQ1:IID问题的后果和触发条件是什么?
       RQ2: 开发者在代码实现过程中是如何引入IID问题的?
       RQ3:IID问题的常见运行时行为是什么?
       RQ4:IID问题在代码实现上是否存在常见的反模式?
第四,基于总结到的常见反模式,本文开发了一个低效图像显示问题静态检测工具TAPIR,对真实的Android应用程序进行检测。同时,为了分析TAPIR检测到的IID问题对性能的影响,我们分析了修复这些IID问题前后应用程序的性能。
4、 结果(Result & Findings)
基于描述框架,我们对从243个流行的开源Android应用程序中收集的216个真实世界的IID问题进行了实证研究,本文发现:
      对于RQ1:大多数IID问题会导致应用程序崩溃(29.2%)或速度减慢(40.7%)。处理大量图像(55.0%)和大图像(45.0%)是触发IID问题的主要条件。
      对于RQ2:缺少必要的功能模块(28.2%),代码的功能模块实现不当(37.5%),第三方库配置错误(21.8%)和使用不合适的第三方库(12.5%)是IID问题的主要实现错误。
      对于RQ3:非自适应的图像解码(49.1%),冗余图像解码(19.9%),图像解码导致UI阻塞(8.3%),和图像对象泄漏(5.6%)是导致IID问题的常见运行时行为。
      对于RQ4:不调整大小的图像解码(23.1%),冗余图像解码(16.7%),UI事件处理程序中的图像解码(8.3%),无边界图像缓存(3.2%)是IID问题的主要反模式。
本文总结了七组用于IID问题检测的代码模式规则。基于这些规则,实现了一个静态检测工具TAPIR,并用243个真实Android应用程序对其进行了评估。TAPIR在16个应用程序的两个不同版本中发现了49个和64个以前未知(手动确认)的IID问题,其中,Android应用的开发者已确认16个IID问题,并且13个IID问题已由各开发者修复。
本文随机选择TAPIR检测出的6个IID问题作为研究对象,分析这6个IID问题在修复前后对应用程序性能的影响。实验结果表明,这些IID问题被修复后,在应用程序的响应时间上,大多数修复后的应用程序在性能上取得了数十到数百毫秒到性能提升。
5、 结论(Conclusions)
本文为IID问题的图像显示过程建立了一个描述框架。基于描述框架,本文对216个真实Android应用程序的IID问题进行了实证研究,验证了Android应用程序中IID问题的广泛性,并且发现它们存在共性的触发条件、后果、代码实现、运行时行为和反模式。基于这些经验发现,本文开发了一个静态IID问题检测器TAPIR,实验表明TAPIR可以高精度地检测出Android应用中的IID问题,并且检测出的问题会对Android应用的运行时性能产生很大影响。


Key words: Android app; inefficient image displaying; performance; empirical study; static analysis;

[1] Tian-Ni Xu, Hai-Feng Sun, Di Zhang, Xiao-Ming Zhou, Xiu-Feng Sui, Sa Wang, Qun Huang, and Yun-Gang Bao. NfvInsight: A Framework for Automatically Deploying and Benchmarking VNF Chains [J]. Journal of Computer Science and Technology, 2022, 37(3): 680-698.
[2] Jun Ma, Qing-Wei Sun, Chang Xu, and Xian-Ping Tao. GridDroid---An Effective and Efficient Approach for Android Repackaging Detection Based on Runtime Graphical User Interface [J]. Journal of Computer Science and Technology, 2022, 37(1): 147-181.
[3] Que-Ping Kong, Zi-Yan Wang, Yuan Huang, Xiang-Ping Chen, Xiao-Cong Zhou, Zi-Bin Zheng, and Gang Huang. Characterizing and Detecting Gas-Inefficient Patterns in Smart Contracts [J]. Journal of Computer Science and Technology, 2022, 37(1): 67-82.
[4] Gen Zhang, Peng-Fei Wang, Tai Yue, Xu Zhou, Kai Lu. MEBS: Uncovering Memory Life-Cycle Bugs in Operating System Kernels [J]. Journal of Computer Science and Technology, 2021, 36(6): 1248-1268.
[5] Zhou Zhang, Pei-Quan Jin, Xiao-Liang Wang, Yan-Qi Lv, Shou-Hong Wan, Xi-Ke Xie. COLIN: A Cache-Conscious Dynamic Learned Index with High Read/Write Performance [J]. Journal of Computer Science and Technology, 2021, 36(4): 721-740.
[6] Songjie Niu, Shimin Chen. TransGPerf: Exploiting Transfer Learning for Modeling Distributed Graph Computation Performance [J]. Journal of Computer Science and Technology, 2021, 36(4): 778-791.
[7] Yi-Xuan Tang, Zhi-Lei Ren, He Jiang, Xiao-Chen Li, Wei-Qiang Kong. An Empirical Comparison Between Tutorials and Crowd Documentation of Application Programming Interface [J]. Journal of Computer Science and Technology, 2021, 36(4): 856-876.
[8] Jason Liu, Pedro Espina, Xian-He Sun. A Study on Modeling and Optimization of Memory Systems [J]. Journal of Computer Science and Technology, 2021, 36(1): 71-89.
[9] Heng Bu, Ming-Kai Dong, Ji-Fei Yi, Bin-Yu Zang, Hai-Bo Chen. Revisiting Persistent Indexing Structures on Intel Optane DC Persistent Memory [J]. Journal of Computer Science and Technology, 2021, 36(1): 140-157.
[10] Jian-Bin Fang, Xiang-Ke Liao, Chun Huang, De-Zun Dong. Performance Evaluation of Memory-Centric ARMv8 Many-Core Architectures:A Case Study with Phytium 2000+ [J]. Journal of Computer Science and Technology, 2021, 36(1): 33-43.
[11] Feng-Juan Gao, Yu Wang, Lin-Zhang Wang, Zijiang Yang, Xuan-Dong Li. Automatic Buffer Overflow Warning Validation [J]. Journal of Computer Science and Technology, 2020, 35(6): 1406-1427.
[12] Jung-Been Lee, Taek Lee, Hoh Peter In. Topic Modeling Based Warning Prioritization from Change Sets of Software Repository [J]. Journal of Computer Science and Technology, 2020, 35(6): 1461-1479.
[13] Yong-Hao Wu, Zheng Li, Yong Liu, Xiang Chen. FATOC: Bug Isolation Based Multi-Fault Localization by Using OPTICS Clustering [J]. Journal of Computer Science and Technology, 2020, 35(5): 979-998.
[14] Gökçer Peynirci, Mete Eminaǧaoǧlu, Korhan Karabulut. Feature Selection for Malware Detection on the Android Platform Based on Differences of IDF Values [J]. Journal of Computer Science and Technology, 2020, 35(4): 946-962.
[15] Lan Huang, Da-Lin Li, Kang-Ping Wang, Teng Gao, Adriano Tavares. A Survey on Performance Optimization of High-Level Synthesis Tools [J]. Journal of Computer Science and Technology, 2020, 35(3): 697-720.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
[1] Tian-Ni Xu, Hai-Feng Sun, Di Zhang, Xiao-Ming Zhou, Xiu-Feng Sui, Sa Wang, Qun Huang, and Yun-Gang Bao. NfvInsight: A Framework for Automatically Deploying and Benchmarking VNF Chains[J]. Journal of Computer Science and Technology, 2022, 37(3): 680 -698 .
[2] Xiao-Long Yang, Xiao-Hong Jia, Yuan Liang, and Lu-Bin Fan. 6D Object Pose Estimation in Cluttered Scenes from RGB Images[J]. Journal of Computer Science and Technology, 2022, 37(3): 719 -730 .
[3] Xiao-Rui Chen, Min Tang, Cheng Li, Dinesh Manocha, and Ruo-Feng Tong. BADF: Bounding Volume Hierarchies Centric Adaptive Distance Field Computation for Deformable Objects on GPUs[J]. Journal of Computer Science and Technology, 2022, 37(3): 731 -740 .
[4] Shi-Min Hu, Paul L. Rosin, and Tian-Jia Shao. Preface[J]. Journal of Computer Science and Technology, 2022, 37(3): 559 -560 .
[5] Rong-Yu Cao, Yi-Xuan Cao, Gan-Bin Zhou, and Ping Luo. Extracting Variable-Depth Logical Document Hierarchy from Long Documents: Method, Evaluation, and Application[J]. Journal of Computer Science and Technology, 2022, 37(3): 699 -718 .
[6] Hua-Peng Wei, Ying-Ying Deng, Fan Tang, Xing-Jia Pan, and Wei-Ming Dong. A Comparative Study of CNN- and Transformer-Based Visual Style Transfer[J]. Journal of Computer Science and Technology, 2022, 37(3): 601 -614 .
[7] Tianyu Zhao, Man Zeng, and Jianhua Feng. An Exercise Collection Auto-assembling Framework with Knowledge Tracing and Reinforcement Learning[J]. Journal of Computer Science and Technology, 0, (): 1 .
[8] Fan Liu, De-Long Chen, Rui-Zhi Zhou, Sai Yang, and Feng Xu. Self-Supervised Music Motion Synchronization Learning for Music-Driven Conducting Motion Generation[J]. Journal of Computer Science and Technology, 2022, 37(3): 539 -558 .
[9] Peng-Fei Fang, Xian Li, Yang Yan, Shuai Zhang, Qi-Yue Kang, Xiao-Fei Li, and Zhen-Zhong Lan. Connecting the Dots in Self-Supervised Learning: A Brief Survey for Beginners[J]. Journal of Computer Science and Technology, 2022, 37(3): 507 -526 .
[10] Min-Ling Zhang, Xiu-Shen Wei, and Gao Huang. Preface[J]. Journal of Computer Science and Technology, 2022, 37(3): 505 -506 .

ISSN 1000-9000(Print)

         1860-4749(Online)
CN 11-2296/TP

Home
Editorial Board
Author Guidelines
Subscription
Journal of Computer Science and Technology
Institute of Computing Technology, Chinese Academy of Sciences
P.O. Box 2704, Beijing 100190 P.R. China
Tel.:86-10-62610746
E-mail: jcst@ict.ac.cn
 
  Copyright ©2015 JCST, All Rights Reserved