Opinion on Java's performance

Hi,

I recently posted this blog post on the memory usage of Java.

http://tuxychandru.blogspot.com/2007/06/java-needs-much-more-memory-than-native.html

What do u guys feel about its content? Feel free to post your opinions either as comments or as forum replies.

I'm interested in understanding the reason why Java progs use more RAM and how it can be solved.

[390 byte] By [chasana] at [2007-11-27 8:33:24]
# 1
My only comment is that is against Sun's Terms of Use (which you agreed upon when registering here) to post links to your own (blog) site in order to increase traffic.Abuse reported.
prometheuzza at 2007-7-12 20:29:33 > top of Java-index,Java Essentials,Java Programming...
# 2
I think if you're worrying so much about performance purely in terms of how much memory the platform is using, you don't really understand "performance", or much about how a system is built
georgemca at 2007-7-12 20:29:33 > top of Java-index,Java Essentials,Java Programming...
# 3
I'm extremely sorry, prometheuzz. This was not an attempt to increase traffic. In fact, I was just lazy to type out the whole thing again in the forum.
chasana at 2007-7-12 20:29:33 > top of Java-index,Java Essentials,Java Programming...
# 4

Also, I understand that performance is not just about the memory usage. But, if Java platform is going to be used by more commonly on desktops, it just means that the users would need more RAM.

Can't the runtime be redesigned in such a way that not all runtime classes are loaded before the actual program is run. I mean, can't the necessary classes be loaded dynamically.

In fact many smaller programs don't use many of the classes available in the complete runtime.

This is just my idea and I might be wrong, if so please correct me.

chasana at 2007-7-12 20:29:33 > top of Java-index,Java Essentials,Java Programming...
# 5

> Can't the runtime be redesigned in such a way that

> not all runtime classes are loaded before the actual

> program is run. I mean, can't the necessary classes

> be loaded dynamically.

That is exactly how it has been working for over ten years.

> This is just my idea and I might be wrong, if so

> please correct me.

You are.

'Opinions' and 'ideas' about performance are not interesting. Not even slightly. What are interesting are measurements and observations about performance, and then strategies for improvements based on those observations and measurements. Did you make any?

ejpa at 2007-7-12 20:29:33 > top of Java-index,Java Essentials,Java Programming...
# 6

http://java.sun.com/developer/technicalArticles/javase/consumerjre/

At this link, Sun has put the following words,

For example, a recent version of Java SE 6 sports an rt.jar file of over 40 MB alone. If you add in the various other JAR files, native libraries, and resource files that get touched at startup, regardless of any application-specific code, that's a lot of data that has to be read in.

From that, I understood that rt.jar gets read fully even if the application doesn't need all those classes for running.

chasana at 2007-7-12 20:29:33 > top of Java-index,Java Essentials,Java Programming...
# 7

> http://java.sun.com/developer/technicalArticles/javase

> /consumerjre/

>

> At this link, Sun has put the following words,

>

> For example, a recent version of Java SE 6 sports

> an rt.jar file of over 40 MB alone. If you add in the

> various other JAR files, native libraries, and

> resource files that get touched at startup,

> regardless of any application-specific code, that's a

> lot of data that has to be read in.

>

>

> From that, I understood that rt.jar gets read fully

> even if the application doesn't need all those

> classes for running.

no. It doesn't all get read. Or if it does most of it doesn't stay in memory unless needed.

If you have a 1000 page book, do you think it's too thick because you need to browse through the index to find the page you need?

jwentinga at 2007-7-12 20:29:33 > top of Java-index,Java Essentials,Java Programming...
# 8

That was a nice explanation. So I understand that the extra memory usage of Java progs is purely due to the JVM itself.

I hope something gets done to reduce the startup time of Java desktop apps. I think the consumer JRE project is trying to do something. I hope it succeeds and helps in accelerating the acceptance of Java as a desktop platform.

chasana at 2007-7-12 20:29:33 > top of Java-index,Java Essentials,Java Programming...