wood burning stoves 2.0*
The moose likes Struts and the fly likes improving struts performance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "improving struts performance" Watch "improving struts performance" New topic
Author

improving struts performance

Pamungkas Timotius
Greenhorn

Joined: May 22, 2005
Posts: 26
Hi all, maybe someone here can help me

I have a struts-based web application which access Oracle database, and run in Oracle Container 2 J2EE. It also uses Tomcat4 (yes, it is Tomcat version 4.1, although I -and my DBA- don't understand what's the connection between OC4J and Tomcat)..

I have serious performance problem here. Basically, my application contains multiple forms for each user, so I maintain this concept using HttpSession.

Now -CMIIW- maintaining a lot of HttpSessions will impact performance... But it seems no other way to implement multiple-forms-for-single-user concept
The session timeout itself is 30 minutes..

My application uses
- list of bean A, where each bean A in list will have multi list of bean B(I implement the multilist myself, using recursive algorithm to add or remove item, because this list will have 'leveling' for each bean B)
- custom tags to generate html for list above
- Javascript validation, which is generated using JSP, based on recursive multi list, and for each page, the validation itself may reach at least 2500 lines of javascript codes
- one HttpSession for each user (well, I've tried to check how many active sessions using tomcat manager http://test-server.it.co.id:8888/manager/sessions?path=/..., but I can't find the context path, I've tried all names under tomcat's ROOT, but none matched -any idea about the context path?-). During my google, I found that maybe this is them most significant performance issue, but I'm not sure
- access to Oracle database, where the machine in which this database exists give high I/O activity

My application need about 30 seconds to be displayed properly, and more than 5 minutes if branch office try to access it. Normally, application will be displayed in less than 5 seconds in IT Dept, or at most 2 minutes for branch office.

I've already give log at my application, and database access is not performance issue (it just takes lses than 10 seconds to retrieve required data).

So, what can I do to improve performance?
Pamungkas Timotius
Greenhorn

Joined: May 22, 2005
Posts: 26
oh, also... I have no synchronized methods nor SingleThreadModel implementation...
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
Before you can improve performance, you need to figure out where the performance problems are. If your code is doing a lot of iterations and generating large html files, then the problem is in your code and/or your design. You will not be able to fix the problem by tuning your session settings.

At a minimum I would add some performance logging into your action classes. If you action executes pretty fast then you know that the performance issues are either with the processing in your jsp or with the size of the html files you are producing. If the main difference between your "IT Dept" and "Branch Office" numbers is the network connection then that points to html file size. You need to rethink your "2500 lines of javascript code" solution.

I don't run in to many other people using OC4J (Oracle Application Server). Tomcat? Oracle uses Apache as the web server but you must have a special configuration if you are also using Tomcat.

- Brent
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: improving struts performance
 
Similar Threads
Excess functionality?
Servlet thread pool management with JMX
strange problem regarding session management in websphere 3.5.3
maximum session occur
Tomcat and Database Sessions