All people are saying Struts has performance issues as the FiterDispatcher (Contoller) creates a new action class object for every new request from a web client.
But in struts official website at Struts Offical Website
They said "Struts 2 Action objects are instantiated for each request, so there are no thread-safety issues. (In practice, servlet containers generate many throw-away objects per request, and one more object does not impose a performance penalty or impact garbage collection.)"
The red colored lines say it is not a problem but most of the people say it has problem.
So please real time struts developers in the world who have worked both on Struts 1.x and 2.x please say exact truth to world whether really struts has performance problems due to this aspect.
Been using Struts 1.2 before we switched to Struts 2 in my project. From my personal experience, I had NEVER wanted to go back to Struts 1.x. True that Action class is instantiated per request(which you can easily test), and hence thread safe, but they're spot on with the red text in your quote. I don't buy this story of instantiating an Action class for every request degrading performance. At least, we didn't encounter any such performance setbacks.
Coderanch, best ever forum on the net. Hands down.
Of course there is no such thing as "exact truth" about whether some programming practice is a "problem" or not. That's like asking for the "exact truth" about whether 125 metres is a "long distance".
In my opinion the sentence you quoted in red letters is correct. If you have an application where the response time requirements are so stringent that you can't afford a millisecond to create an object, then you really shouldn't be using a framework like Struts anyway. But chances are you don't have such an application. Chances are that you don't even have published response time requirements. Chances are that these people talking about "performance issues" haven't even measured any performance measures.
posted 7 years ago
if we increase heap size at server side will there be any change of performance. I am thinking this as if my webapplication got 1000 requests at a time then if i am using struts 2.x then there may be memory problems. So wil der be a change if i inc my heap size.
It's possible, yes. Depending on what you mean by "performance". Have you measured something and decided it's too small, or too large? Just picking on random things and trying to "fix" them by changing something isn't necessarily going to help your problem, if you even have one.