Announcement Announcement Module
Collapse
No announcement yet.
spring overhead Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring overhead

    I am wondering if anyone has a similar exerience using spring. I have a j2ee app which uses spring and hibernate. After profiling the app, i see 60% or more over head comes just from using spring. There are too many intermediary pieces of code between getting a reference and making a simple method invocation.
    Is this the general fate of any app which uses some form of aop?

  • #2
    Hmm, if you have a single app which simply constructs a factory and retrieves a bean, then yes, I would expect this

    If I can get my app to where spring is the biggest overhead, I will be a *very* happy boy

    Comment


    • #3
      just beans

      We have a domain model using pojos and a data access layer. In the domain model, we primarily use spring for dependency injection and in data access layer we use HibernateDaoSupport. From web layer, we use spring to get reference to business layer which has slsb facade, plus inject some dependencies like loggers etc.

      Comment


      • #4
        How are you getting the 60% figure?

        If you are using something like a method tree with invocation time then this is misleading because a spring class will invoke your method, and in a tree, the spring invocation time will contain the time it took your method.

        Maybe if you could post some methods/times this will help explain....

        Comment


        • #5
          What profiler are you using? Smart profilers are capable enough of pointing out the 'tree' yatesco talked about - note that as Spring manages your objects (and thus most of the invocations in case of AOP) you'll see Spring as doing the work but actually it's just a wrapper around your classes.

          Comment


          • #6
            FWIW; I use jprofiler, and find it to be most useful

            Comment

            Working...
            X