The Artima Developer Community
Sponsored Link

Java Buzz Forum
How much slower is Spring (proxies) compared to plain pojo?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Marc Logemann

Posts: 594
Nickname: loge
Registered: Sep, 2002

Marc Logemann is founder of www.logentis.de a Java consultancy
How much slower is Spring (proxies) compared to plain pojo? Posted: Jul 17, 2007 12:44 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Marc Logemann.
Original Post: How much slower is Spring (proxies) compared to plain pojo?
Feed Title: Logemann Blog
Feed URL: http://feeds.feedburner.com/LogemannBlog
Feed Description: Marc Logemann's thoughts on java and other stuff
Latest Java Buzz Posts
Latest Java Buzz Posts by Marc Logemann
Latest Posts From Logemann Blog

Advertisement

I recently met a programmer who argued that he doesnt like Spring because of all the proxying and the resulting lack of performance. I argued that there are most likely gazillion places in the code that should be profiled in order to make the app faster but to look at the overhead of object creation and method calls is silly in most of the cases. But he insisted on his oppinion. Of course i tried to back up my arguments with real world performance metrics on the internet but i just havent found any.

It would be really useful if the Spring guys would create a white paper when it comes to performance wrt JDK and cglib proxies. Of course there are plenty things to test. One should take a normal class, create an instance with new and make some calls to its methods. Then one could do the same with a spring bean without any services and then go ahead with spring beans with services like transactional. Of course this cant be compared to a plain pojo anymore but it would give you some numbers. Nothing hinders someone to test transactional spring beans to EJB2/3 entitiy beans or something.

But i hate speaking with people that analyzed a stacktrace of a spring bean and conclude that this is the worst of all problems, only because there are some more method calls inbetween.

Of course this person has never heard of the most trivial things in Spring like bean inheritance or the various scopes. A person who said that its better to supply each object with an applicationContext only because you dont rely on DI then and its easier to go without spring in the future. I think he just dont get the whole concept. For freaks like these it would be very handy to have numbers to throw with. Unfortunately I just dont have the time to write benchmarks for this…

Read: How much slower is Spring (proxies) compared to plain pojo?

Topic: Facebook VC Fund Previous Topic   Next Topic Topic: Intelligent Groovy

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use