• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

improving struts performance

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
oh, also... I have no synchronized methods nor SingleThreadModel implementation...
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Tick check! Okay, I guess that was just an itch. Oh wait! Just a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic