File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes struts and memory over head Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts and memory over head" Watch "struts and memory over head" New topic

struts and memory over head

Faisal Ishaque

Joined: Jun 09, 2003
Posts: 8
I think there is lot of memeory overhead using struts, because if you made lot of html tags using stuts html tags, each tags associted with the class...
In large projects, some persons recommend that to use struts.But i think MVC pattern is not very difficult to implement.
MVC is there to develop application neatly and quickly.
Peter den Haan
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
That doesn't really have anything to do with Struts, does it? It's about custom tags. Two things.
First, it's not memory usage that's significant; after all, all those tags won't live any longer than it takes to render the JSP. My experience is that this is only a fraction of the total response time. Object churn might more be a problem, but modern JVMs do a good job of efficiently collecting short-lived objects. And in any case this is the JSP container's responsibility to worry about: containers are free to recycle JSP tag objects to some extent.
Second, you can't be serious about wanting to avoid custom tags. That's not just saying "no" to Struts, it's also saying "no" to the JSTL, to JavaServer Faces, to just about everything that's nice and sexy about JSPs today
- Peter
[ June 27, 2003: Message edited by: Peter den Haan ]
Faisal Ishaque

Joined: Jun 09, 2003
Posts: 8
thanks for reply..
Now suppose 1000 requests arrives at server, thousands of objects are created for handling these requests.
In this senario what do you think about extensive usage of struts and other frame works like Cocoon etc.
In this case, still there is no responsibility of develpor to see the memory managment and other issues or server can handel this?
I agree. Here's the link:
subject: struts and memory over head
It's not a secret anymore!