去除装饰以提高能源效率

D. Bree, M. Cinnéide
{"title":"去除装饰以提高能源效率","authors":"D. Bree, M. Cinnéide","doi":"10.1109/saner53432.2022.00108","DOIUrl":null,"url":null,"abstract":"With growing concerns regarding climate change and rising energy costs, there is an increased focus on improving the energy efficiency of software. One relevant avenue of research is the transformation of software designs in order to increase efficiency and reduce energy consumption. Design Patterns are of interest here as the indirection they introduce is likely to have a detrimental effect on energy consumption. In this paper we report on our investigations into the impact on energy consumption of the Decorator pattern, which is a structural design pattern used to enable additional behaviour to be attached to an individual component dynamically. Application of this pattern improves the maintainability of software at the cost of increased indirection and redundancy, which may reduce energy efficiency. In this paper we explore features of the Decorator pattern that impact on its systematic removal, with a future goal of removing this pattern using automated refactoring. We subsequently examine experimentally the Decorator pattern's impact on energy consumption in Java and find its implementation results in an increased number of instantiated objects and method invocations at run-time. The removal of the pattern can result in up to a 96% reduction in energy consumption in a best-case scenario with a textbook example, and up to a 5% reduction in energy consumption in an open-source project with a case study examining JUnit, a popular unit testing framework for Java. These results demonstrate the energy savings achievable with the removal of Decorator pattern instances and open the way for similar investigations of other design patterns.","PeriodicalId":437520,"journal":{"name":"2022 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)","volume":"16 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":"{\"title\":\"Removing Decorator to Improve Energy Efficiency\",\"authors\":\"D. Bree, M. Cinnéide\",\"doi\":\"10.1109/saner53432.2022.00108\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"With growing concerns regarding climate change and rising energy costs, there is an increased focus on improving the energy efficiency of software. One relevant avenue of research is the transformation of software designs in order to increase efficiency and reduce energy consumption. Design Patterns are of interest here as the indirection they introduce is likely to have a detrimental effect on energy consumption. In this paper we report on our investigations into the impact on energy consumption of the Decorator pattern, which is a structural design pattern used to enable additional behaviour to be attached to an individual component dynamically. Application of this pattern improves the maintainability of software at the cost of increased indirection and redundancy, which may reduce energy efficiency. In this paper we explore features of the Decorator pattern that impact on its systematic removal, with a future goal of removing this pattern using automated refactoring. We subsequently examine experimentally the Decorator pattern's impact on energy consumption in Java and find its implementation results in an increased number of instantiated objects and method invocations at run-time. The removal of the pattern can result in up to a 96% reduction in energy consumption in a best-case scenario with a textbook example, and up to a 5% reduction in energy consumption in an open-source project with a case study examining JUnit, a popular unit testing framework for Java. These results demonstrate the energy savings achievable with the removal of Decorator pattern instances and open the way for similar investigations of other design patterns.\",\"PeriodicalId\":437520,\"journal\":{\"name\":\"2022 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)\",\"volume\":\"16 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2022-03-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"2\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2022 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/saner53432.2022.00108\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/saner53432.2022.00108","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2

摘要

随着对气候变化和能源成本上升的日益关注,人们越来越关注提高软件的能源效率。一个相关的研究途径是软件设计的转变,以提高效率和降低能耗。这里对设计模式很感兴趣,因为它们引入的间接性很可能对能源消耗产生有害影响。在本文中,我们报告了我们对Decorator模式对能耗影响的调查,Decorator模式是一种结构设计模式,用于将额外的行为动态地附加到单个组件上。这种模式的应用提高了软件的可维护性,但代价是增加了间接性和冗余性,这可能会降低能源效率。在本文中,我们将探讨Decorator模式中影响其系统移除的特性,未来的目标是使用自动化重构来移除该模式。随后,我们对Decorator模式在Java中对能耗的影响进行了实验研究,并发现其实现导致了运行时实例化对象和方法调用数量的增加。在使用教科书示例的最佳情况下,删除该模式最多可以减少96%的能耗,在使用使用JUnit(一种流行的Java单元测试框架)的案例研究的开源项目中,最多可以减少5%的能耗。这些结果表明,通过删除Decorator模式实例可以节省能源,并为其他设计模式的类似研究开辟了道路。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Removing Decorator to Improve Energy Efficiency
With growing concerns regarding climate change and rising energy costs, there is an increased focus on improving the energy efficiency of software. One relevant avenue of research is the transformation of software designs in order to increase efficiency and reduce energy consumption. Design Patterns are of interest here as the indirection they introduce is likely to have a detrimental effect on energy consumption. In this paper we report on our investigations into the impact on energy consumption of the Decorator pattern, which is a structural design pattern used to enable additional behaviour to be attached to an individual component dynamically. Application of this pattern improves the maintainability of software at the cost of increased indirection and redundancy, which may reduce energy efficiency. In this paper we explore features of the Decorator pattern that impact on its systematic removal, with a future goal of removing this pattern using automated refactoring. We subsequently examine experimentally the Decorator pattern's impact on energy consumption in Java and find its implementation results in an increased number of instantiated objects and method invocations at run-time. The removal of the pattern can result in up to a 96% reduction in energy consumption in a best-case scenario with a textbook example, and up to a 5% reduction in energy consumption in an open-source project with a case study examining JUnit, a popular unit testing framework for Java. These results demonstrate the energy savings achievable with the removal of Decorator pattern instances and open the way for similar investigations of other design patterns.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信