Performance impact of using aop

前端 未结 9 2311
小蘑菇
小蘑菇 2020-12-05 02:07

We have started to use spring aop for cross cutting aspects of our application (security & caching at the moment).

My manager worries about the performance impa

9条回答
  •  暖寄归人
    2020-12-05 02:32

    i have used spring AOP in a batch process in my current project to transaction manage a database.

    At first, it was figured that there wouldn't be a performance problem, but we didn't figure into the equation that we called the database thousands of times. one aspect call in aop doesn't affect performance much, but multiply that by thousands, and it turns out the new system was worse than the old one, due to these extra method calls.

    I'd say that aop is a great system to use, but try to take note on how many methods calls are added to your application

提交回复
热议问题