• Post Reply Bookmark Topic Watch Topic
  • New Topic

Make the Java perform well (Java Performance Tunning)

 
Sanjay Jadhav
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guies,
This the repeate of posting from Topic: This week's giveaway!.
Is as follows.
Hi Jack,
Good to see u here.
I had questions for you.
1> How did the duplication of class loading make java perform slow ?
2> At what extend did the reusability of object is ok, or why not developer use cloned objects instead ?
3> Did you have any good example for jdbc connection pooling for server-side, can be use with servlet/jsp developded MVC model ?
4> how about cache more than 10000 records and putting it in session and make available all over the web application, and what will if i have 5 such cache which is in there respective session so in my current jsp i can access required data from those session (It is about e-commerce application on which im working).
5> Can i get sample chapters in pdf format from you book to get idea about your book.
with best regards,
 
Wouter Zelle
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question 5 is answered in this thread.
 
Jack Shirazi
Author
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. I don't really understand this. I'm not aware of any duplicate class loading in Java (and I don't think Java is slow). Please could you elaborate?
2. Cloning an object still creates a new object. Resuing objects is a technique to avoid the overheads of creating new objects. You should reuse objects where you have identified a bottleneck in the application that is caused by creating too many objects and you can ameliorate the bottleneck by reusing objects.
3. Connection pooling is supposed to be mostly transparent. So however you get your connections, you can replace that with obtaining a connection from a connection pool and the code should work as before, but more efficiently. This should be independent of whether you are using MVC.
4. Caching records is normally an excellent solution to JDBC performance problems. The tradeoff is the amount of memory necessary needed to maintain the cache.
--Jack Shirazi
JavaPerformanceTuning.com
 
Sanjay Jadhav
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jack,
Thanks for your kind reply for my request.
1> How to integrate with 3rd party libraries, which have conflicting classes, how to use remote stubs, etc. (this is about j2ee duplicate class loading)
2> Here is the code which some time hung on cs.executeUpdate(), why it is so. as the currentConnection is from ConnectionPool. as im using Visual Age, in debug mode it stop on this 'cs.executeUpdate()' statement.

[ May 02, 2003: Message edited by: Sanjay Jadhav ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!