User: Password:
|
|
Subscribe / Log in / New account

Problems

Problems

Posted Dec 4, 2003 18:50 UTC (Thu) by stuart2048 (guest, #6241)
In reply to: Problems by ncm
Parent article: Peer to Peer Freedom of Speech

I think you have it backwards. Long running, dynamic programs are an ideal candidate for Java. Good security and gc. Short lived programs, like cat or ls are bad candidates because the JVM startup and teardown cost is huge. Kind of like stuffing an elephant through a garden hose.

This heavyweight startup is one of the most frustrating things I find with Sun's JVM implementations. (Note that I am careful to separate the JVM implementation from Java-the-language.) Moore's law is doing a better job than Sun at making Java start faster, unfortunately.

I have made a career out of building long lived Java programs. And I too would say that 380MB is on the unreasonably high side. However the good news about Java is that it's possible to inspect the code and heap to see exactly where all that CPU and memory is going. You can do extremely detailed analysis of program flow and discover every object's lifetime, transparently without any developer involvement. This is very powerful. (Have you read Permutation City? Java might be a good candidate for running copies and the Autoverse :-).

Unfortunately, bloat is often not your fault at all: sometimes it's the underlying library. Library developers with big, fat 3.0GHz machines often don't see the cost of their laziness ;-).

Writing good, well behaved Java programs takes a great deal of experience in knowing what works and what doesn't. Java makes it easy to write slow code that works. With a little more effort it is also possible to write efficient code that works better.

--Stuart


(Log in to post comments)


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds