一句话:实证表明将 MVC 转为带捆绑的 MVP,通过批量延迟视图更新可降低约 30% 能耗。
软件能耗过高会影响移动设备等边缘设备的可用性;能耗本质上是系统级性能,宜在设计阶段通过软件架构解决,但开发者常缺乏相关设计知识。本文通过实证研究考察架构设计对能耗的影响,重点分析 Model-View-Controller(MVC)模式,并将其改造为带捆绑(bundling)的 Model-View-Presenter(MVP)模式。作者在基准系统和真实应用上测量能耗,分析捆绑与延迟视图更新同能耗的关系。结果表明,在 presenter 中捆绑事件通常可降低约 30% 的能耗,说明简单的架构设计选择即可显著改善软件能耗。
Energy consumption is a concern in the data-center and at the edge, on mobile devices such as smartphones. Software that consumes too much energy threatens the utility of the end-user's mobile device. Energy consumption is fundamentally a systemic kind of performance and hence it should be addressed at design time via a software architecture that supports it, rather than after release, via some form of refactoring. Unfortunately developers often lack knowledge of what kinds of designs and architectures can help address software energy consumption. In this paper we show that some simple design choices can have significant effects on energy consumption. In particular we examine the Model-View-Controller architectural pattern and demonstrate how converting to Model-View-Presenter with bundling can improve the energy performance of both benchmark systems and real world applications. We show the relationship between energy consumption and bundled and delayed view updates: bundling events in the presenter can often reduce energy consumption by 30%.
@inproceedings{ChowdhuryHKSMK19,
title = {GreenBundle: An Empirical Study on the Energy Impact of Bundled Processing},
author = {Shaiful Alam Chowdhury and Abram Hindle and Rick Kazman and Takumi Shuto and Ken Matsui and Yasutaka Kamei},
booktitle = {ICSE},
year = {2019},
doi = {10.1109/icse.2019.00114}
}