Performance impact of using aop

前端 未结 9 2323
小蘑菇
小蘑菇 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:43

    When I used it, I didn't - but then my application isn't your application.

    If you use it for calls which are used in a very tight loop, there's the opportunity for a significant performance hit. If it's just used to check security once per request and cache various things, I can't see how it's likely to be significant - but that's why you should profile and benchmark your app.

    I realise that "measure with your app" probably isn't the answer you were looking for, but it may well be the one you guessed you'd get :)

提交回复
热议问题