Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does this book address performance in Sping

 
Terry Milan
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of the concerns that I have with frameworks is on the issue of performance and scalability of serverside applications. Does this book address only the issues of how to use, or does it demonstrate methods that can boost throughput?
 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May be am wrong. But my understanding is that Spring is just a wrapper on top of other frameworks. For eg Spring does'nt provide its own persistance solution. But it makes it easy for you to work with various persistance solutions out there like hibernate, jdo implementation, ojb etc.
So i guess Spring by itself might not be the bottleneck. You need to understand the underlying mechanism that you are employing and would need to tune that.
But yeah Spring has its own MVC. I dont have much idea of how it performs when compared to other frameworks out there.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my experience, the MVC framework you use has rather insignificant part to play in your application's performance. Most problems tend to crop up in the persistence layer.

Having said that, Spring's AOP framework gives you a lot of power and you can easily shoot yourself with that power if you're not careful (e.g. accidentally logging a couple of hundred method calls per request could be a slight performance drain...).
 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean performance hit as a result of using proxy / cglib?
AOP abuse is one. Is there usually a huge difference between implementing logging (or for that matter security, transactions etc) using direct calls than by using proxies?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Karthik Guru:
You mean performance hit as a result of using proxy / cglib?
AOP abuse is one. Is there usually a huge difference between implementing logging (or for that matter security, transactions etc) using direct calls than by using proxies?

I was referring to the fact that you can easily make a little mistake and accidentally cause a lot more activity inside the framework than you intended to. Another possible performance killer can be the use of dynamic pointcuts which decide at runtime whether a given advice should be applied to the pointcut. Craig and Ryan estimated in "Spring in Action" that a dynamic pointcut takes 5 to 10 times more time to execute compared to a static pointcut.
 
Rob Harrop
Author
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Terry,

Wherever it is applicable yes we do. Typically this in the AOP stuff, where Spring has a lot interaction. In other areas, Spring is just a thin wrapper around other frameworks and adds negligible overhead to the application.

Rob
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic