Is Java a slow language?

I had a lot of questions during the webinar that I co-delivered a few days back, and I’d really like to answer them all. I’m going to do my best.

One of the listeners asked:

A lot of non-Java-savvy people still have the perception of Java as a slow language – they feel they’re giving up performance for more morally correct concepts such as platform independance, etc… What kind of real world performance are we seeing in the RCP (and specifically SWT widgets)?

The simple answer is that Java is quite fast enough for many applications and that Eclipse RCP applications are rather zippy in performance. In fact, there are a number of games implemented in Java (games being a type of application that tend to require pretty good performance). My kids are obsessed with RuneScape which is a massive online game written in Java. There are a great many other games also written in Java. But, I assume you’re not all that interested in games.

The Eclipse IDE is itself an RCP application and is a pretty good performer. For almost all of the RCP applications I’ve encountered, the performance of the application itself is great; it’s the backend systems (databases, web services, IIOP calls, etc.) that are normally the source of wait time. The SWT (Standard Widget Toolkit) that provides the Eclipse user interface components is implemented in terms of platform user interface components and is therefore pretty responsive.

Measuring performance is as much an art as it is a science. User perception is a key element and Eclipse has functionality to make the user’s perception of performance even better. If you’ve used the CVS repository exploring feature in Eclipse, you’ve probably noticed that it incrementally populates tables with information from the CVS repository as it is loaded. While the amount of time that it takes to get the data is the same, the fact that the list is at least partially populated and the GUI is still responsible makes the wait easier for the user. That same functionality is available for your applications (I use it in my eBay RCP application — which I’m going to try and make available soon).

At the end of the day, whether or not performance is good enough is a completely subjective discussion. In my experience, it’s plenty fast for the kinds of rich clients that most folks are building. Is it fast enough for writing games or applications that need to run a bajillion numeric calculations? Possibly.

Is a pickup truck “fast enough”? It all depends on what kinds of things you need to do with it.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s