On 08/13/2011 01:32 AM, Reinier Zwitserloot wrote:
On Friday, August 12, 2011 put11:37:15 PM UTC+2, mbien wrote:
see it as performance optimisation. A GC impl which would have to
deal
with fragmented, non continuous and resizing heap would have a hard
time to compete with the current VM. A JVM is a operating system for
java applications. You can't plug in new RAM brick in your system
easily at runtime for the same reasons.
I would go even further and say that writing java applications with
unknown memory requirements is not that professional :P
This is spot on. For large server apps. For client apps or quick
command line tools, being forced to prepick total memory load (and
treating the JVM that's going to start up to host your app as an
OS-in-a-OS), is ridiculous.
Agreed. Michael is right in general, but as Reiner says Java apps for
the desktop are seriously impacted by this. The problem is not that you
can't figure out in advance a setting for -Xmx, but the fact that it's a
single "average" setting that won't work for all users. For instance, if
you create a desktop app with large memory requirements (such as an
image processing tool) either you set a low limit (say, 1GB) and you get
people with 4GB of RAM in their PC complaining about the fact that your
app is not able to use all of them, or you set a high limit (say, 4GB)
and unfortunately the app will allocate all of the memory even though it
doesn't need it, because the current GC is designed like that. This will
cause paging in machines with less memory, impacting the performance of
the app... and you end up with people saying that Java is slow. In my
experience, you have to provide a way for the user to set his own
setting, which also implies the need of a configurable launcher (no
rocket science, but an annoyance). The bigger problem, anyway,
That's why I'm completely uninterested in language improvements, such as
Project Coin or closures, things where other languages can provide
innovation, while some basic weaknesses of the VM (where others can't
provide innovation) aren't dealt with after sixteen years.
--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
java.net/blog/fabriziogiudici - www.tidalwave.it/people
fabrizio.giud...@tidalwave.it
--
You received this message because you are subscribed to the Google Groups "The Java
Posse" group.
To post to this group, send email to javaposse@googlegroups.com.
To unsubscribe from this group, send email to
javaposse+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/javaposse?hl=en.