Skip to main content

Snakecharming the Masses

Posted by editor on September 19, 2008 at 8:06 AM PDT


The performance arms race over in JavaScript-land

JavaScript takes a lot of abuse for being a hacky, standardization-resistant language that we all have to live with because it's built into all the browsers, making it the lynchpin of Ajax. Not that it doesn't have its defenders; it has closures and duck typing and lots of the other frequently-touted advantages of more prominent agile languages like Ruby and Python.

Let's face it, part of the problem a lot of us have with it is the clumsy naming where they tried to tie it to Java even though there's little relation between the two past a few syntactical similarities (they both use curly braces... woo hoo). Surely many (most?) of us have had to deal with a recruiter who didn't know there's a difference between Java and JavaScript?

One thing that's interesting is a new JavaScript performance arms race that seems to have started between the two major open-source browser engines, Gecko and WebKit. Last month, Ars Technica reported that Gecko's JavaScript engine, SpiderMonkey, had gotten a 20- to 40-times speed up in some cases. This put it ahead of the recently-improved SquirrelFish, WebKit's rendering engine. Now we get word that SqurirrelFish has gone "extreme", and that SquirrelFish Extreme is posting some remarkable benchmarks, claiming to have surpassed Gecko's TraceMonkey to retake the speed crown. Yeah, like that'll last.

Why do you care? If you're writing an Ajax app, it's self-evident that faster JavaScript engines will improve the client-side user-experience of your application. It's also worth remembering that JavaFX is using WebKit for its web support. So anything that helps WebKit indirectly helps JavaFX as well.

While we're on the topic of JavaScript, the latest java.net Poll asks "What's your opinion of JavaScript?" Cast your vote on the front page, then visit the results page for current tallies and discussion.


In Java Today,

JavaWorld has posted an introduction to the JOGL project in Open source Java projects: Java Binding for OpenGL (JOGL). Author Jeff Friesen writes, "If you're planning to develop a game engine or other Java software that needs 3D graphics, consider using Java Binding for OpenGL (JOGL). This low-level Java API acts as a bridge to the underlying platform's OpenGL technology. In this installment of the Open source Java projects series, Jeff Friesen introduces JOGL. Learn how to use JOGL to bring OpenGL's high performance and powerful features (such as shaders) to your Java-based games."

Databases aren't just for enterprise apps running on servers. In a new SDN article, Patrick Keegan shows off A Personal Data Storage Application With Embedded Java DB. "In this application, we will use NetBeans to create a simple desktop application to store info on your personal music collection. We will use Java DB, which has an embedded mode so that it can be packaged within the application. The application will also make use of the Beans Binding library and the Java Persistence API."

WidgetFX is an open-source desktop widget platform written from the ground up in the JavaFX Script language. It can run widgets written in JavaFX Script and Java and takes advantage of the latest features in the Java Consumer JRE (Java SE 6 Update 10). Its first release, 0.1, is targeted at developers who want to develop widgets.


In today's Weblogs, Eamonn McManus discusses Dropping proposed features from the new JMX API. "Yesterday I cleaned up the "umbrella bug" that lists the various things we are planning for version 2.0 of the JMX API, which is the version that should be included in Java SE 7. Here's a list of the things we were thinking of doing but are not now planning to."

Ramesh Parthasarathy points out the release of
Generic JMS RA 2.0. "Generic JMS RA 2.0 is available as an alpha version download today, we are working towards promoting it to a release."

Do we need Data Models that Mom can use? John Reynolds writes, "back when I was working on Tandy's DeskMate we were trying to build a personal computer "that Mom could use". I think we came pretty close to that goal... Mom could use it. Unfortunately Mom didn't want to use it :-( Is there any chance at all of coming up with Data Modeling notation that Mom could use?"


In today's Forums,
kordzik argues that community feedback is working as desired in the Java community, in
Re: Has Java lost its way?. "Well, isn't it what's actually happening in Java, at least to some significant extent? As I understand, you have the closures idea on your mind in the first place, when you're speaking of the 'me2' attitude. Well, you don't see everybody in the community being overly enthusiastic about the BGGA proposal. In fact, there is a vivid discussion among 'the gods' themselves (like Gafter vs. Bloch), and chances are, we're not gonna see closures before Java 8 (if we're ever gonna see Java8 in the first place - hopefully we will:). As I look at what is to come in Java7 (e.g. http://www.infoq.com/interviews/gafter-closures-language-features-optional-typing ), I don't see anything controversial or 'me-too-isch' besides closures, which, as already said, are discussed over and over again and might not hit 7 at all. I think this is a good example that Java's direction is actually very much dependent on the community, especially if you compare it to other languages and platforms."

Jim Graham has the likely explanation for a performance problem, in
Re: [JAVA2D] Scaling using java.awt.Image is vay faster than bufferedImage. But Why?. "As I suspected - this is boiling down to the fact that we don't have specific loops to handle the type of image you are working with so our "generalized backup loops" are being called on to do the work, albeit at a slower pace. The image you got from ImageIO appears to be a 1-bit binary image - I assume your input data was just a bi-level, possibly black/white, image? We don't have a lot of loops to handle those images so internally they need to be converted to other formats for handling. Also, the code appears to go through our other image scaling path which uses an AffineTransformOp to scale it rather than the more direct TransformHelper route that the other images are using."


Current and upcoming Java
Events
:

Registered users can submit event listings for the href="http://www.java.net/events">java.net Events Page using our href="http://today.java.net/cs/user/create/e">events submission form.
All submissions go through an editorial review before being posted to the
site.


Archives and Subscriptions: This blog is delivered weekdays as
the Java
Today RSS feed
. Also, once this page is no longer featured as the
front page of java.net it will be
archived along with other past issues in the href="http://today.java.net/today/archive/">java.net Archive.

The performance arms race over in JavaScript-land