The moose likes JDBC and the fly likes Performance question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Performance question" Watch "Performance question" New topic

Performance question

Jennifer Sohl
Ranch Hand

Joined: Feb 28, 2001
Posts: 455
I have a JTree that is being populated via a ResultSet everytime the user presses the button.
On my PC, when I run it, it takes the tree about 8 seconds to come up.
I tried two other PC's this app is running on, one of them took 14 seconds, and the other, only took 4 seconds to come up.
I guess my question is, why is the performance really fast on one machine, and really dumpy on another?
I thought maybe the stored procedure was causing the poor performance, but is this possible, even though on a different PC, it is much much faster?
Is it maybe more of a PC issue rather than a database issue?
Thanks for any help you can give me!
Joe Ess

Joined: Oct 29, 2001
Posts: 8836

Originally posted by Jennifer Sohl:

Is it maybe more of a PC issue rather than a database issue?

Very much so. There are a number of factors that impact computer performance. Processor speed, bus speed, memory cache, available RAM, number and load of other applications and so on. Database calls usually start off CPU-bound, that is, their performance is limited by CPU speed, but very quickly become memory-bound, since every table in a query has to be passed through RAM during the query. You can use the task manager in Windows or "top" in Linux to watch the load your application puts on a computer. If you can hear the hard drive churning when you run your query, you have run out of memory and the CPU is wasting cycles swapping RAM to disk and vice versa. In the business world it is almost always cheaper to solve such performance problems by buying newer/better hardware than to spend developer time chasing bottlenecks.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Jennifer Sohl
Ranch Hand

Joined: Feb 28, 2001
Posts: 455
I agree. Here's the link: http://aspose.com/file-tools
subject: Performance question
Similar Threads
Stupid Question about Operating Systems
NetBeans 4.0 vs Eclipse 3.01
Question Error?
CPU usage monitoring
Java File Splitter and Joiner