摘要
AOP通过功能方面代替对象能大幅度提高系统的复用率,系统结构简洁、清晰[1]。静态AOP编译组织运行效率高,但需使用专用编译器进行预编译,不能与OOP兼容;动态AOP和静态AOP相比,灵活性高,且语法结构与OOP完全兼容,方便系统开发和移植[2]。但由于动态AOP基于拦截器模式实现,且在运行时组织的特性使其效率低下,AOP组件通常为系统核心组件,对动态AOP的优化对系统性能有重要意义[3]。提出了一种基于字节码迁移技术的动态AOP优化算法,有效提高了动态AOP性能,接近静态AOP的运行效率。
Byusingaspectinsteadofobject, AOP not only greatly improve the rate ofsystem reusage, but also make the system structure much more concise and clearer, Static AOP has high runtime performance because it is weaving when compiling, but uses special compiler when compling programs. So it cannot be compatible with OOP. Comparing with static AOP, dynamic AOP has high agility, and its syntax structures are entirely compatible with OOP. Because of the two the systems based on it can be developed and transplanted easily. But dynamic AOP is implemented through interceptor pattern and will be weaving during the running time, thus results in low runtime performance. Usually the AOP components are core components of the system, so the optimization of dynamic AOP will be meaningful for improving the system performance . An optimization algorithm based on bytecode transformation technology is introduced. This algorithm effectively improve the performance of dynamic AOP, and its runtime performance is close to that of static AOP when optimizing the static configuration.
出处
《计算机工程与设计》
CSCD
北大核心
2006年第19期3656-3659,共4页
Computer Engineering and Design