G Estes

Ranch Hand
+ Follow
since Oct 22, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by G Estes

Also, this morning, I found out that the database is not properly indexed...that in itself should improve performance and the speed at which the next() method is able to move the database cursor and return the next set of data.

Thanks for all of your input, but this one looks like it is a database side issue.

Until next time...
Thanks, but already tried that with values of 10, 100, 500 and 1000. None had any impact. We have found out that the database side has views that depend on other views, etc... so views on views on views. They are looking into that now and expect to improve performance by better use of database resources.

I think there may just be an inherent over-head causing a bottle neck on performance for JDBC. Does anybody else think 2-3 ms per rs.next() is excessive? I know that on another project where we use Hibernate/Spring and a true n-Tier approach, we are able to bring back thousands of records in much faster times and we can get them back as a List of data in a block. If I could do that with JDBC, that would be nice.

Any other ideas?
The RecordProcessor "IS" a thread/runnable object that processes the given ResultSet in the background. The issue is not with how fast the RecordProcessor takes. Given a Vector of the same data, that logic will process the entire batch of 5000 in approx 2 secs. The time consuming item is the rs.next() method.
I have an issue with performance in some code that I have inherited and am looking for a way around it. This Java/Swing application has client side calls via JDBC to the database using a CollableStatement. Summary of code follows:


In my scenario, say the call returns 5000 rows of data. The code as presented above, that does not instantiate the RecordProcessor (which is a threaded processor for each result returned), simply spinning through the 5000 records takes 17-18 seconds, consistently.

Given this, the bottle neck appears to be the rs.next() method. Short of a complete refactor of the tiered architecture, is there anything that can be done to enhance the performance?
Try this...then read through what is going on...should help...


[ September 08, 2008: Message edited by: G Estes ]
15 years ago
or create a JScrollPane, set it as horizontal or vertical and add one label for each image you are displaying. The image will be on each label.
15 years ago
Can you post some code as to how you are implementing the file chooser?
15 years ago
Ditto. If, however, you are trying to build a browser based web app, you may want to try another Java frame work such as JSP/Struts or my personal favorite for such work, the NextAPP Echo2/3 AJAX framework.
15 years ago
It sounds to me like you just need a listener added to the first tree. When a node is added, add a similar node to the second.

What am I missing here?
15 years ago
I would probably start with the sun.java.com website at:

http://java.sun.com/new2java/

From there, follow the appropriate tutorials and afterward, find some good books. As a practical note, one thing that I have found useful when learning a new technology is to develop a simple telephone directory look up tool. It can be as simple or complex as you like, but be sure to do full Create, Read, Update and Delete (CRUD) functionality. Data can be stored in a simple flat text file at first, then once complete, if you design the MVC correctly, you can change the flat file into a database such as MySQL for further training.

Also check out the following:

http://www.javabeginner.com/java-swing-tutorial.htm

Hope this helps...not simple, but effective...
[ September 02, 2008: Message edited by: G Estes ]
15 years ago
That was a good thought, but made no impact. Almost like I need to fire an event to trigger edit mode maybe?
15 years ago
Thanks for the response. Our JTable has several custom renderer/editors and while I can see that the selection is happening (i.e. I Shift+Tab then type and the text goes into the correct cell), the editor is not coming up on entry - as it does doing a normal Tab action. Any suggestions as to what may be different here?
15 years ago
On the confirm dialog, you get (by default) Yes, No and Cancel buttons. You will need to query the returned value as follows and then take the appropriate action:


[ August 21, 2008: Message edited by: gil_e ]
15 years ago
Or a singleton pattern where the static class gives out the one and only instance...
15 years ago
For me, I was an OS/2 Presentation Manager developer who got called onto a development project for an airline ticketing kiosk project. The project was targeted for Java as it needed to be cross-platform. That said, we got books and read, we were given some classes in Java Bootcamp style, and we attended local JUG meetings. Over the years, more books, more meetings and more training...
15 years ago