• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Performance issues in java

 
sridhar lakka
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Thanks in advance.
In our project we are using Struts1.0,Jsp,Servlets,Oracle9i,web sphere5.0.
We have completed development, and one of the major and very important requirement is that two consecutive pages timeinterval should be 2 sec.
But it is not working like that.We have followed very good coding rules.
Please tell me what are the different root causes which decreases the performance.

Thanks ,
Sree
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34668
366
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sree,
You need a profiler to see where the time is going. If we guess, you could tune the wrong thing. That said, the biggest bottleneck in a web application is usually the database.
 
sridhar lakka
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks a lot for very useful reply.
We are not using any IDE of websphere, I searched on the net for profiler every where they are talking about specific to IDE.
We are using Eclipse and Websphere application server.
Please tell me how to use this profiler in this environment.

Regards,
Sree
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34668
366
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sree,
JProbe supports WebSphere 6.

You can verify/refute the "it's the database" theory with some System.out.printlns() to time that layer too.
 
sridhar lakka
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks.
I read that doc in which they are telling that is a paied one.
And we have tested WILY tool but now i need which is better than this.
Please help me out.
Regards,
Sree
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34668
366
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sree,
I recommend starting a new thread in the IDEs and other Tools forum asking specifically about profiling tools. That's where people are most likely to know about this.
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<<You can verify/refute the "it's the database" theory with some System.out.printlns() to time that layer too.>>
Using the jamon open source jdbc driver is easier than this and it will give you
1) performance of all queries (hits/avg/total/min/max more),
2) Performance of all jdbc method calls,
3) If any exceptions are thrown it will track that too

No code changes are needed. Simply use the jamon jdbc driver to wrap the underlying driver. Here is an example. If you need further help let me know. Note JAMon will work with ANY JDBC driver.

JDBC Syntax Without JAMon: An example of how to connect to a database using a JDBC driver follows (The example uses Sybase, but any vendors driver would do)

Class.forName("com.sybase.jdbc2.jdbc.SybDriver");
String url = "jdbc:sybase:Tds:MyServerDNS:2638";
Connection conn = DriverManager.getConnection(url, user, passWord);

JDBC Syntax With JAMon: The following code will use JAMon as a proxy to track performance, but uses the underlying driver to perform the queris (The example uses Sybase, but any vendors driver would do). Note no code changes would be required if connection strings were placed in a configuration file. The JAMon jar file must also be placed in the classpath.

Class.forName("com.jamonapi.proxy.JAMonDriver");
String url = "jdbc:jamon:sybase.Tds:MyServerDNS:2638?jamonrealdriver=com.sybase.jdbc2.jdbc.SybDriver";
Connection conn = DriverManager.getConnection(url, user, passWord);



For more info...
http://jamonapi.sourceforge.net/#WhatsNew22

You can look at the link below for a live demo of the type of data the jamon jdbc driver will give you...
[ May 07, 2007: Message edited by: steve souza ]
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
2 seconds seems like quite an ambitions goal for a web based application. I think my project has requirements of something like 10 seconds for simple pages and 20 seconds for complex ones.

- Brent
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If 2 seconds is the criterion, then the time needed by the client computer / browser to display your pages, and the network capacity become important factors.
On my computer, 2 seconds is the time that my (already started up) browser needs to display a static html file, text only, from my local c: drive.

Regards, Jan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic