It's not a secret anymore!
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Bad Performence Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Bad Performence" Watch "Bad Performence" New topic

Bad Performence

pascal auderset

Joined: Aug 21, 2002
Posts: 15
Do you also have such a bad performence when you do a test like this:
main ...
for (int i = 0; i < 50; i++) {
Thread t = new TestThread();
class TestThread extends Thread {
public void run() {
String thread = Thread.currentThread().getName();
try {
FlyByNightService service = connection.getService(db);
for (int i = 1; i < 10; i++) {
DataInfo info = service.getRecord(i);
} catch (Exception ex) {
The database is the db.db file from sun.
In my case this test takes 2minutes 20 sec.
Matt Ghiold
Ranch Hand

Joined: Feb 24, 2002
Posts: 213
Answering that question is very tricky, cause perfomance is not based on software alone.
I can take the best piece of software and run it on a 400mtz and have really bad performance.
I will tell you this, I have run something very similiar on my system and it took <1min, but im running on a 2.4gtz machine with 1/2 a gig of ram.
Hope this helps.

-Matt<br /> SCJP2<br /> SCJD
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

but im running on a 2.4gtz machine with 1/2 a gig of ram.

Not if I find out where you live.

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937

In my case this test takes 2minutes 20 sec.

I am not sure what you are doing (maybe your server is in California and the client is in Massachusetts), but a similar test takes less than 10 seconds on my 800MHz machine.
You are running 50 threads each geting 10 records, but try the opposite, -- 10 threads each getting 50 records and see what happens.
[ January 17, 2003: Message edited by: Eugene Kononov ]
I agree. Here's the link:
subject: Bad Performence
It's not a secret anymore!