Java slow ?

S

Steven J Sobol

Andrew Thompson said:
I have 512Meg and *still* have trouble!

Alright, wise guy. :) I have problems even if I have NOTHING loaded, and
even a small app I'm working on takes forever to load.

--
JustThe.net Internet & New Media Services, Apple Valley, CA PGP: 0xE3AE35ED
Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) / (e-mail address removed)
Domain Names, $9.95/yr, 24x7 service: http://DomainNames.JustThe.net/
"someone once called me a sofa, but i didn't feel compelled to rush out and buy
slip covers." -adam brower * Hiroshima '45, Chernobyl '86, Windows 98/2000/2003
 
M

Manish Hatwalne

Not joking at all!!!
However, google archive is sort of..... inconvenient. I meant some sort of
article or in FAQ maybe.

rgds,
- Manish

Andrew Thompson said:
It would be great if this thread can be archived, great source of
information.

Manish.. I cannot -quite- tell if you
are joking or not, so (shrugs)...
<http://google.com/groups?thl=0,840654030,840646196,840587172,840378008,8406
45878,840637807,840528203,840523127,840494540,840427632,840418275>

[ And if you are joking.. ROTFL! ;-) ]

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
D

Dimitri Maziuk

Chris Uppal sez:
Though it's worth noting that most current JMVs /do/ use GC algorithms where GC
time is proportional to the number of live objects. And so execution time
/can/ grow linearly with the size of live memory, which could fairly be
described as "doesn't scale".

Subject, of course, to the important observation that all sophisticated GC
algorithms contain optimisations that nearly always obviate this problem.
Still, they can't eliminate it in all cases, and they can't eliminate it
without help from the programmer in other cases, so it's one more thing for
people with Very Big datasets to keep in mind.

For values of "Very Big" = "lots of objects", which isn't necessarily
the same as "size of live memory".

Yes, GC implementation can be tuned for a particular application, GC
thread can run on a dedicated CPU, etc. But the botom line is: it takes
longer to crunch more data. It is true of the mainline and it is true of
GC. So a garbage-collected language will have mainline slowdown X, plus
GC slowdown Y. As opposed to just X in a non-GC language.

Similarly, in a single-root language where every class automatically
inherits from Object, objects are heavier than in a language where
classes can be created from scratch. The overhead may be small and
benefits may be well worth it, but the overhead is still there.

So I think it's fair to say that, all other things being equal,
a non-GC, non-single-root language should scale better than Java
in terms of both memory footprint and performance.

Dima
 
R

Roedy Green

I have noticed a strong psychological tendency in myself to worry only
about programs that are too slow on the machine I currently own. When
I get an upgrade, my concern about a certain class of problem just
vanishes.

The developers at Sun almost certainly have machines considerably more
powerful than mine. It is unreasonable to expect them to have
uppermost in their minds how the program performs on my machine, or
one even slower.

Then there is the question of where should their priorities be:

1. providing new functionality.

2. shoe-horning any new functionality so that it will still run fast
on old machines.

From a business perspective (1) is far more important. You please the
customers with the money.


This leads me to a general question. How can I simulate various old
klunkers on my machine to see how my code will perform on them?

1. I can change the display resolution.

2. I could prune back the VM Size.

3. I could create some high priority task that chews up most of the
cpu time. The question becomes, how to calibrate it.
 
B

blmblm

It is one addition slower. In a Pentium class machine that addition
can be done for free using an index register. That is not exactly
"much slower"

That's what I'd think too.

To the original poster: Unless there's something moderately strange
going on, it is easy to compute the location in array a of a --
multiply i by the size of the elements and add to the address of the
0-th element. This should be independent of the size of the array
and does not involve starting from the beginning of the array every
time. How were you thinking it works?

(And to other readers: Are there situations in which an array
*could* reasonably be implemented in a way that would produce the
results the o.p. describes?)
 
S

Steven J Sobol

Roedy Green said:
The developers at Sun almost certainly have machines considerably more
powerful than mine. It is unreasonable to expect them to have
uppermost in their minds how the program performs on my machine, or
one even slower.

Then there is the question of where should their priorities be:

1. providing new functionality.

2. shoe-horning any new functionality so that it will still run fast
on old machines.

GMAFB.

My laptop is less than a year old, with a 2 gigahertz processor in it
and a quarter-gig of RAM. How the hell is that an "old" machine? Or
"underpowered," for that matter? OK, I do want to put another 256MB of RAM
in the machine, but the current config is ok for most of the stuff I do.

--
JustThe.net Internet & New Media Services, Apple Valley, CA PGP: 0xE3AE35ED
Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) / (e-mail address removed)
Domain Names, $9.95/yr, 24x7 service: http://DomainNames.JustThe.net/
"someone once called me a sofa, but i didn't feel compelled to rush out and buy
slip covers." -adam brower * Hiroshima '45, Chernobyl '86, Windows 98/2000/2003
 
R

Roedy Green

It is one addition slower. In a Pentium class machine that addition
can be done for free using an index register. That is not exactly
"much slower"

One of the simplest optimisations in to convert the index*4 + base to
a add of 4 in a loop. In that case the low level code looks the same
for both pointers and arrays.

This whole business of using pointers in preference to arrays so no
longer buys you anything. In fact is LOSES you speed since other
optimisations have to be turned off.
 
C

Chris Smith

Steven said:
GMAFB.

My laptop is less than a year old, with a 2 gigahertz processor in it
and a quarter-gig of RAM. How the hell is that an "old" machine? Or
"underpowered," for that matter? OK, I do want to put another 256MB of RAM
in the machine, but the current config is ok for most of the stuff I do.

You might want to take a second to calm down. Roedy didn't accuse you
of anything, and you have nothing to defend yourself against.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
S

Steven J Sobol

Chris Smith said:
You might want to take a second to calm down. Roedy didn't accuse you
of anything, and you have nothing to defend yourself against.

While I can reasonably be accused of being hotheaded with this last post,
and Roedy didn't directly accuse me of anything, I was reacting to the
implications of the post. Reading between the lines, so to speak.

And I'll say at this point that while I use what works for the particular
job I'm doing, whether it be VC, VB, gcc, PHP, Perl, Java or something else,
I'm gravitating towards Java for a lot of stuff. I particularly like the
portability of Java applications between platforms (and that's one of the
reasons I got interested in it).

So I'm not out for Java-bashing - there are just a couple things I think
need fixed.

--
JustThe.net Internet & New Media Services, Apple Valley, CA PGP: 0xE3AE35ED
Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) / (e-mail address removed)
Domain Names, $9.95/yr, 24x7 service: http://DomainNames.JustThe.net/
"someone once called me a sofa, but i didn't feel compelled to rush out and buy
slip covers." -adam brower * Hiroshima '45, Chernobyl '86, Windows 98/2000/2003
 
A

Andrew Thompson

.
I have noticed a strong psychological tendency in myself to worry only
about programs that are too slow on the machine I currently own. When
I get an upgrade, my concern about a certain class of problem just
vanishes.

I think developers should *work* to resist this.
I have a Win95 based 486 that I use for backwards
testing.
The developers at Sun almost certainly have machines considerably more
powerful than mine. It is unreasonable to expect them to have
uppermost in their minds how the program performs on my machine, or
one even slower.

I would like to see* someone from Sun attempt
to download the 1.5 JRE (around 30Meg, IIRC)
using a dial-up modem on an ISP account that
automatically cuts you off after 8 hours.. :-/

[ * Well OK - it would become very boring
very quickly, but it is the concept that is
(mildly) interesting.. ]
 
A

Andrew Thompson

On Sat, 29 May 2004 00:13:50 +0530, Manish Hatwalne wrote:

(archive - Google)
Not joking at all!!!
However, google archive is sort of..... inconvenient.

You find Google inconvenient?
Sort of ...Why?
 
C

Chris Smith

Steven said:
While I can reasonably be accused of being hotheaded with this last post,
and Roedy didn't directly accuse me of anything, I was reacting to the
implications of the post. Reading between the lines, so to speak.

I'll try to say this delicately; that's dangerous when you're conversing
with Roedy. There are any number of times when I am tempted to be upset
at something Roedy says... until I realize that he isn't responding to
the conversation; but only using a one-liner somewhere to find an
opportunity to interject something interesting but unrelated.

From my perspective, that appears to have happened here as well; Roedy
is commenting on how it's easy to forget about performance if you've got
a monster machine sitting on your desk, and speculating on ways to fix
it.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
R

Roedy Green

I would like to see* someone from Sun attempt
to download the 1.5 JRE (around 30Meg, IIRC)
using a dial-up modem on an ISP account that
automatically cuts you off after 8 hours.. :-/

I did a lot of screaming about downloads when I lived on Quadra Island
and only had dial up access that would stay up for at most 2 hours at
a stretch. I invented several new download schemes.

See http://mindprod.com/projects/sax.html
http://mindprod.com/projects/bulkfiledistributor.html
http://mindprod.com/projects/deltacreator.html
http://mindprod.com/projects/prebrandedsoftwarerental.html
http://mindprod.com/projects/autoupdate.html
http://mindprod.com/projects/napster.html


Now I have cable access, my interest has turned to other problems.
 
R

Roedy Green

I'll try to say this delicately; that's dangerous when you're conversing
with Roedy. There are any number of times when I am tempted to be upset
at something Roedy says... until I realize that he isn't responding to
the conversation; but only using a one-liner somewhere to find an
opportunity to interject something interesting but unrelated.

I tend not pay any attention to who said something. That information
appears way at the bottom of the screen and is often missing. To me it
feels like "the Internet" is one giant schizophrenic personality. I am
mainly interested in the ideas, not the individuals.

If find the one-upmanship games people like to play of trying to prove
someone was an idiot by twisting their words, or making them bow down
and formally admit error somewhat childish. I unsubscribed the Eudora
newsgroup recently because this practice was so widespread. I also
find attribution quibbling pointless. What counts whether something is
true, not who said it, or whether someone in past made a misstatement.

Everyone wants to make everything I say about *them*. It is almost
never about them, except in times when I take my gloves off.

I just like to bring up interesting ideas at any excuse. People then
try to find deep inner meaning -- a hidden insult. Why did I mention
this in response to something they said? When I insult you, you will
know it. This may be ego-deflating, but most of the time I can't be
bothered to have an opinion about you personally. Everyone comes
through in the exact same drab format.

Perhaps if messages were formatted with distinctive colourschemes and
fonts everyone would not blend into an amorphous mass. Perhaps if we
had picons, the way we had on BIX, where your logo or photo appeared
on every message I could keep you distinct.

See http://mindprod.com/jgloss/picon.html
 
H

Hamilcar Barca

I would like to see* someone from Sun attempt
to download the 1.5 JRE (around 30Meg, IIRC)
using a dial-up modem on an ISP account that
automatically cuts you off after 8 hours..

I'm not a fan of these huge downloads, but the v1.5 beta 2 JDK is about
45MB bytes and I can download it in 2-1/2 hours. The Eclipse M8 beta
takes about 5 hours.
 
S

Sudsy

Hamilcar Barca wrote:
I'm not a fan of these huge downloads, but the v1.5 beta 2 JDK is about
45MB bytes and I can download it in 2-1/2 hours. The Eclipse M8 beta
takes about 5 hours.

If you can afford it, broadband in any flavour is awesome! I can't
even comprehend waiting hours for a download these days. Even 28 MB
downloads in five minutes or less....
I personally don't know of anyone who's gone back to dial-up once
they've tasted high-speed.
Perhaps the vanguard of a mass migration?
 
A

Andrew Thompson

I'm not a fan of these huge downloads, but the v1.5 beta 2 JDK is about
45MB bytes and I can download it in 2-1/2 hours. The Eclipse M8 beta
takes about 5 hours.

On *dial* *up*?!?
 
H

Hamilcar Barca

On *dial* *up*?!?

I guess. I average about 5.1kB/sec, so the times given above are
approximately correct. For the big ones, I start the transfer before I go
to bed and let the Internet do its magic while I sleep. (Unfortunately,
by the time I've decided to download something, I really want it now, not
tomorrow, but 5.1kB is what I've got.)
 
S

Steven J Sobol

Chris Smith said:
I'll try to say this delicately; that's dangerous when you're conversing
with Roedy. There are any number of times when I am tempted to be upset
at something Roedy says... until I realize that he isn't responding to
the conversation; but only using a one-liner somewhere to find an
opportunity to interject something interesting but unrelated.

OK, I apologize, Roedy - and I'll try not to do so in the future.

--
JustThe.net Internet & New Media Services, Apple Valley, CA PGP: 0xE3AE35ED
Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) / (e-mail address removed)
Domain Names, $9.95/yr, 24x7 service: http://DomainNames.JustThe.net/
"someone once called me a sofa, but i didn't feel compelled to rush out and buy
slip covers." -adam brower * Hiroshima '45, Chernobyl '86, Windows 98/2000/2003
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top