Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Performance question

 
Jennifer Sohl
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 9339
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jennifer Sohl
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic