Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide
translations



Rockbox mail archive

Subject: Re: VM question for developers

Re: VM question for developers

From: L. Scott Emmons <rboxrox_at_egads.dhs.org>
Date: Thu, 8 May 2003 19:34:31 -0700

On Wednesday 07 May 2003 16:12, TP Diffenbach wrote:
> Memory: for the VM plus the libraries plus the interpreted code.
> Speed: java, at least (can't speak about Python) is slow -- a good part of
> the reason is that it allocates memory for everything except primitives.

Sorry, but as a Java developer, I dispute the myth that Java is inherently
slow. Yes, AWT and Swing are slow, but that truly has nothing to do with the
VM itself. Yes, Java, like any language (even C), has to allocate memory to
store anything, even primitives - they still take memory, no way around that.
Large Swing apps tend to be slow and consume all available memory - this is
certainly true!

I write server-based (no UI) Java programs in my day job that are just as fast
as the C programs we are replacing (really, it's true!). Please, don't take
this the wrong way. 2 years ago when I started working on a Java development
team I was pretty skeptical, but I'm now a believer.

Is Java the right thing for the Archos? Not necessarily. (Hey, I'm a believer,
but not religious about it!) Though, it can be, but not with a server (or
even desktop computer) JVM. There are are some small implementations (for
example microcontroller based) that are pretty slick at the small end of the
scale, and implementations for cell phones somewhere in the middle. I've seen
some really cool things in the embedded Java world, like the Java Stamp.

For the archos, a minimalistic implementation is probably a requirement. One
nice thing about Java is it's modular enough that you only need to bring over
the classes that you actually need, though of course this doesn't mean you
can just run every Java app on the planet. For something like an Archos
implementation, you could really pare the RT classes down to a pretty small
size. There's been alot of work done by Sun in defining standardized small
subsets of Java. Still, the Archos doesn't have a whole lot of RAM. We'd
probably want to page the heap out to disk when playing an MP3 to give that
RAM back to the buffer, and page it back in when needed. That would be kinda
fun to write.

The other bad thing is that Java, while being free and having available
source, is NOT open source, nor is it freely distributable (really! Read the
license). This could be a major issue for a project such as this. Just ask
the FreeBSD team about how easy it is to provide a binary distribution of the
Sun JVM. :-)

I guess a question that needs to be asked is: What is the purpose of having a
VM/interpreter on the Archos? What sorts of things do you intend to run? If
it's general purpose scripting, then I'd say Java is out, since you still
need a compiler. There are some pretty cool completely interpreted languages
out there.

Just my opinions on the matter,
-Scott
Received on 2003-05-09

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy