[rescue] Mozilla Firefox

Dave McGuire mcguire at neurotica.com
Mon Apr 26 13:29:01 CDT 2004

On Apr 26, 2004, at 12:59 PM, Charles Shannon Hendrix wrote:
>>   Yep.  Sun is shooting themselves in the foot.  Java is an *amazing*
>> language,
> I've always found Java to be interesting, but nothing new.  It's like 
> an
> OO version of C.

   Exactly.  It's what C++ should have been.  I believe the world would 
be a much better place if:

   - C++ would completely disappear
   - Java would be renamed to C++
   - the "virtual machine" aspect of Java would be completely removed
   - all Java implementations would compile to native binaries

> I pretty well agree with Jamie Zawinski's assessment of Java.  So much
> promise, so many mistakes.

   Isn't that his assessment of everything? ;)

> Sun has tried to create Java by fiat, and I don't believe you can do
> that with a computer language, especially one like Java.  They tried to
> make Java do everything, with the result being that it does nothing 
> very
> well.

   Well...  *shakes head*  It seems pointless to argue with you until 
you've used it for a few real projects.

> Finally, "write once, run anywhere" is pure mythology.  The most 
> obvious
> problem with that idea is that there are only really 4-5 good Java
> machines: Sun, Windows, Linux, Apple, IBM, and they haven't been of
> consistent quality.

   Well ok, I will argue with you. :)

   Well I can't agree with you here.  My experience is with the 1.3 and 
1.4 VM distributions.  Windows is the only outlier here...the threading 
in Windows is so fucked up that you need to detect if you're running in 
Windows and re-jigger all your thread priorities to make things work.  
Aside from that, in a large complex application, performance was 
consistent, accurate, and stable on:

   - RS/6000 running AIX
   - PeeCee running Linux
   - PeeCee running Windows (with the exception above)
   - UltraSPARC running Solaris9
   - PPC G4 running MacOS X

   Now yes, these are the machines that you mentioned...but, for a 
commercial product, what else would you really want to run it on??

>> and it can be plenty fast if the code is written correctly.  I've seen
>> it with my own eyes, and written it with my own text editor.
> I'll believe it when I see it.

   Well it's a commercial product, so I can't give it to you. ;)  But 
this is not theory, this is where I used to work, and that software is 
running in quite a few classrooms today.  Saying you don't believe me 
won't automatically make that software start running slowly. ;)

> I have certainly had usable Java programs, but no fast ones.

   Well that all depends on how you write your code. ;)

> There is a certain amount of unavoidable overhead in Java, and in
> non-trivial programs, it is quite high.

   Of course there is overhead.  I never said "Java is as fast as C".  I 
said Java code can be quite usably fast.  Now, if you try to run it on 
a 233MHz Pentium under Windows with a crippled Windows VM, sure, it's 
going to suck.  But on anything built within the past few years, it is 

   Java's major technical handicap is that Sun has tried to tie the 
language to two concepts over the years...the first was the applet.  
What an abysmally bad idea.  The second was the concept of the virtual 
machine.  Sure, I've found it extremely useful for my last commercial 
Java project, but for anything else (and even for that, actually) it 
would've been much better to have the compilers generate native binary 

   There is nothing about the Java (the programming language) that 
technically ties it to the use of a virtual machine.  That is the main 
thing that makes it slower than everything else.  Compiling to native 
binary would still be slower than something like C, purely because of 
the fact that (regardless of what college professors like to say) C is 
an extremely low-level language, and Java is an extremely high-level 

> The memory overhead for a moderately complex Java GUI in particular
> is very high.

   The application I'm talking about is about 45K lines of Java, and a 
HUGE GUI, back-ended with an SQL database, real-time communications and 
byte-level protocol processing.  The target machine is a 500+MHz/256MB 
G4 running MacOS X or a 1.2+GHz/128MB PeeCee running Linux.  It runs 
fine on both platforms.

   To be clear...Competent Java programmers who know how a JVM works 
(and, I might argue, who started out with procedural languages) can and 
do write quite usably fast Java applications with small memory 
footprints on modest hardware...even large apps with large GUIs.  This 
is not theory, I have done it.


Dave McGuire          "PC users only know two 'solutions'...
Cape Coral, FL          reboot and upgrade."    -Jonathan Patschke

More information about the rescue mailing list