Bubblemark

This posting says some nice things about JavaFX, but also points out that in its current incarnation its performance is lacking:

The first thing you’ll notice is that it’s very slow. The demo takes a very long time to load and start, and real time performance is disappointing. Here is how it compares:

JavaFX — 14 fps
Firefox + Silverlight (JavaScript) — 56 fps
Firefox + Flex — 62 fps
Adobe AIR — 62 fps
Firefox + Silverlight (CLR) — 99 202 fps (update: 202 fps after fixing main timer’s latency)

(All tests were performed on Pentium M 1.7 machine under Windows XP SP2)

It is 4.4x slower than Flash and 7x 14x slower than Silverlight (CLR-based variant).

On a positive side, development with JavaFX is fun, the language is very compact and efficient for building complex dynamic layouts. There is a great converter to JavaFX from SVG format and JavaFXPad is done nicely too.

If only it were 5x faster!

Of course, our intention is to provide hardware-accelerated vector graphics and compile JavaFX script to JVM bytecode getting the full benefits of the hotspot virtual machine, and to provide an improved deployment system, and we're working on that.

The Bubblemark performance described above is caused by

  • Download time - size of the deployment unit - The bubblemark JNLP doesn't use pack200 compression so the download of the JavaFX runtime + the app is ~2.1 MB
  • Performance of the JavaFX interpreter in doing the collision detection - which is currently probably 50-100 times slower than doing it in Java
  • Lack of caching or hardware acceleration of the vector graphics and gradients that make up the ball
Eventually, a production-quality JavaFX will automatically provide these benefits but in the meantime because JavaFX builds on Java, it's possible to get respectable performance for Bubblemark by making a few minor changes:
  1. Use pack200 compression for the Jar files
  2. Do the collision detection in Java code
  3. Cache the vector graphic at the application level - since once created it's static in this application

Below's a version of Bubblemark in JavaFX that does that.

Here's a link to the source code

Comments:

On my MBP, 2.4G, 2G RAM I get about 85fps with 16 balls in play using your new code, nice job. Other numbers: Silverlight JS up to 130fps, DHTML 150fps, Flex 50+fps, Flex cached same?, Swing ~120fps, Silverlight CLR not working (not recognizing install). Anyway, nice job. I like seeing these little demos you do, easy to run, quick to start, fun to play with. Cheers, Patrick

Posted by Patrick Wright on August 25, 2007 at 07:15 PM PDT #

JavaFX runtime + the app=2.1 MB ?

JavaFX is not need JRE?

Posted by G.z on August 27, 2007 at 12:51 PM PDT #

Hi Chris,
How can we Image Cache the JFX object ?

I have a complex SVG file which is converted to JavaFX Script using SVG converter. Its performance is fine, till I tried to scale it.

For mouse Over effect I like to scale this SVG-FX object by factor of 10% increase in Size. Its current performance is very poor. I belive its because JavaFX script is redrawing the complex JAVAFX script again and again.
Is there a way Buffer the final Image and use it instead of redrawing for every mouseOver scaling.

This kind of Image buffering is almost every where used in GUI Effects and Animations.
I hope JavaFX can provide a easy way to do this task(instead of manually creating a bufferedImage and drawing to it for every object).
something like,
myobj.enableBuffer = true

Posted by Kishore on August 28, 2007 at 12:05 AM PDT #

Why you don't post this example to http://www.bubblemar.com web site? The old version is poor and it doesn't help javafx reputation

Posted by Lorenzo on September 09, 2007 at 12:11 AM PDT #

There is a big hole in JavaFX.
Threading.
It seems from the language docs if you use "do" or "do later" you have to use Java classes and look after your own synchronization (and error returns).

This required a VERY skillful programmer.

What we need is threading and result synchronization that the 'average' programmer can use and access directly from the scripting language.

Posted by Matthew on September 13, 2007 at 12:33 PM PDT #

Patrick,

If DHTML is faster than Flash ("Flex"), whatever browser you use there is something going wrong. Safari on OSX can approach flash performance, but other browsers don't even come close not to mention surpassing it.. Same for Swing, it should definitely be faster than DHTML and it's slightly faster than Flash in my tests.

Posted by Fred on September 20, 2007 at 07:35 AM PDT #

Maybe JavaFx will be, like Java, very successful - but mainly on the server. Remember how Java's initial fame came from applets!

To be honest i haven't looked at Java for about 4 years. I began to find it boring - especially after using clientside Javascript/Ajax and server side Ruby. JavaFx looks very good - especially for the serverside. On the client side i dont think anything can resurect Swing etc, however good the language - and i think its very good.

However, it looks like a great language for web scripting/frameworks against sql db's. Especially if the functional "select.." syntax hooks up with sql databases (and possibly data oriented xml docs).
Indeed, with the attribute and trigger functionality it seems as if ER diagrams have been "implemented". Excellent. Pure SQL is to much about - break your data into tables, put it back together, oops the data has been "denormalised".Has any thought been given to JavaFx's server side usage.

Imo you have made very good design decision s in what ideas to use from javascript,ruby,python and functional languages. eg JavaFx has, like Brendan Eich design goals for EcmaScript4 taken a "functional and structural" aproach rather than an class based 00 one - which isn't declarative enough.

If a language with syntax like JavaFx existed \*in\* the browser and on the desktop for os scripting ahhh....

JavaFx, or something similar would be an excellent candidate for the Ecmascript4 syntax.

Posted by james c on September 20, 2007 at 08:49 AM PDT #

James C,
If you haven't looked at Java in 4 years then why comment on Swing or anything Java related? The language has changed a lot in 4 years. When I started using Java in 2000 at University, it was not known for its applets at all. It was instead known for its platform independence and ease of development when compared to C and C++. Which is why MS brought out C# as competition. There is a reason why Java is still the #1 programming language today.

User friendliness and HCI are the most important features (and most difficult to implement) in any application. So making UI design and development easier is certainly the way to go. From what I've seen of Matisse and JFX script, Sun is heading in the right direction.

Chris Olivier,
I've been using JFX script for a bit now, while trying to become an early adopter. I've been highly impressed with it, especially on the visual side of things. It has been a real joy to program in. I hope to be designing real world graphic user interfaces with it very soon, especially flash-like JFX web-pages. Excellent work so far and all the best with it.

Posted by Jean-Pierre Nel on September 25, 2007 at 05:28 PM PDT #

A big improvement.

Interestingly, I noticed that during the test I was getting 56fps AND my CPU usage was barely ticking over at 5-12%. Okay, I have a dual CPU setup so double that figure. So maybe there is much more potential to up those fps figures?

Maybe I'm seeing some of the D3D benefits of the new Update N JRE.

It's been a while since you posted anything, any chance of a nice new app on which to test the new quick start feature of Update N? ;)

C.

Posted by Chris Lowe on October 04, 2007 at 07:24 AM PDT #

Re my comment above. Perhaps JavaFx will find its role in .....
ANDROID.

Frankly, i can't stomach programming in Java but Android looks interesting. Solution: JavaFx.

The only change to JavaFx i would like to see is to use a Ruby/Lua approach to blocks leaving {} for records/dicts.
eg
From:
if (x == y) {
doSomthing()
}

To:
if x == y then
doSomething()
end

or

if x == y
doSomething()
end

(I appreciate this change would have an impact on if expressions)

Posted by James C on November 12, 2007 at 04:28 AM PST #

really good things

Posted by msn avatarları on August 26, 2008 at 09:39 AM PDT #

exccellent

Posted by Sinema on August 27, 2008 at 07:16 PM PDT #

The GC pauses degradate user experience significantly. RealTime java must be used for this kind of GUI (java with 'immortal memory' and no GC thread).

And speaking about client side in general, I get the impression that Sun has nothing to do with design and UI experience. For example, if we take standard Swing LookAndFeels - they are all awful and unnatural. There is a really cool solution though - www.jgoodies.com - why not make these l&fs standard in Java?

-- A happy java serverside developer and a frastrated java ui developer.

Posted by Sergei on November 06, 2008 at 07:23 AM PST #

It runs very poor on my laptop - CPU T5470(1.6GHz), GPU X3100, OS Ubuntu. I get around 13fps and the cpu usage is very high. Do I need windows to run JavaFX with higher performance? :)

Posted by dixon on December 11, 2008 at 01:33 AM PST #

It would be cool if you port it to JavaFX 1.0 release and post to bubblemark.com (old demos there do not work anymore).

Posted by Roman Elizarov on December 12, 2008 at 08:01 PM PST #

pauses degradate user experience significantly. RealTime java must be used for this kind of GUI

Posted by kolbastı on February 04, 2009 at 01:57 AM PST #

thank you

Posted by chat odalari on February 14, 2009 at 05:03 PM PST #

thank you

Posted by chat on February 17, 2009 at 04:01 AM PST #

thank you

Posted by chat on February 17, 2009 at 04:02 AM PST #

thank you

Posted by sicak videolar on February 17, 2009 at 04:03 AM PST #

thank you

Posted by +18 video izle on February 17, 2009 at 04:07 AM PST #

If you look forward to buying some idear laptop betteries, you can see it from http://www.batterygoshop.co.uk/toshiba/satellite-1200-battery.htm toshiba satellite 1200 battery whcih offer the longlife and consistently reliable performance you need to get the most out of your notebook .

Posted by laptop bettery on February 18, 2009 at 11:25 AM PST #

On my MBP, 2.4G, 2G RAM I get about 85fps with 16 balls in play using your new code, nice job.

I accept that comment too. Because i have almost same system and it works great.

Posted by Mimari Proje on March 04, 2009 at 01:27 AM PST #

thank you

Posted by chat on April 29, 2009 at 04:32 PM PDT #

thanks all

Posted by web tasarımı on April 30, 2009 at 04:21 PM PDT #

very thank

Posted by chat on April 30, 2009 at 04:22 PM PDT #

yha ben daha oncede yazmısımda bu sitemi eklemeyi unutmusum :) bunuda ekleyim dedim kabul et adminim benim canım cigerim hadi...thanks all...

Posted by birecik on May 06, 2009 at 12:07 PM PDT #

thanks all

Posted by chat on May 19, 2009 at 10:05 PM PDT #

http://www.smsmatbaa.com

Posted by matbaa on June 22, 2009 at 03:04 AM PDT #

thankss allll

Posted by chat yap on June 22, 2009 at 07:33 PM PDT #

thanks.

Posted by cinsel sağlık on July 02, 2009 at 07:21 AM PDT #

tnkx.

Posted by izlesene on July 02, 2009 at 07:22 AM PDT #

good mans

Posted by youtube on July 02, 2009 at 07:22 AM PDT #

cizgicici thank say mans

Posted by çizgi film on July 02, 2009 at 07:23 AM PDT #

A big improvement... good

Posted by bedava lig tv izle on July 02, 2009 at 07:24 AM PDT #

i like it

Posted by videolar on July 02, 2009 at 07:24 AM PDT #

tnks games

Posted by kral oyun on July 02, 2009 at 07:25 AM PDT #

gold thank you meen

Posted by altın fiyatları on July 02, 2009 at 07:25 AM PDT #

are u maried :D thanks

Posted by evlilik sözleşmesi on July 02, 2009 at 07:26 AM PDT #

tnks

Posted by saç bakımı on July 02, 2009 at 07:26 AM PDT #

tedavi tahnk

Posted by tedavi on July 02, 2009 at 07:27 AM PDT #

god.

Posted by +18 video izle on July 02, 2009 at 07:27 AM PDT #

Thanks, very useful. Regards..

Posted by Bilim on March 12, 2010 at 08:30 AM PST #

web y ya que estoy por acá aprovecho para

Posted by chat on June 29, 2010 at 09:23 AM PDT #

Thanks for very useful article. I really enjoyed reading all of your posts. It’s interesting to read ideas, and observations from someone else’s point of view… makes you think more. So please keep up the great work.

Posted by chat on September 12, 2010 at 11:40 PM PDT #

is liked nice comments editors

Posted by chat siteleri on November 02, 2010 at 05:21 PM PDT #

makes you think more. So please keep up the great work

Posted by konyachat on November 02, 2010 at 05:21 PM PDT #

makes you think more. So please keep up the great work

Posted by chat on November 13, 2010 at 09:30 PM PST #

makes you think more. So please keep up the great work

Posted by ezgichat on November 13, 2010 at 09:31 PM PST #

I have been working fine. Great content of your posted article. Waiting for a hope of new work.

Posted by kayu on November 16, 2010 at 05:52 AM PST #

makes you think more. So please keep up the great work

Posted by muhabbet on November 26, 2010 at 11:57 PM PST #

Simple and Nice example !

Posted by دردشة مصرية on December 04, 2010 at 08:06 PM PST #

Simple and Nice example !

Posted by دردشة on December 04, 2010 at 08:06 PM PST #

Simple and Nice example !

Posted by شات on December 04, 2010 at 08:06 PM PST #

Simple and Nice example !

Posted by شات مصرى on December 04, 2010 at 08:07 PM PST #

impressive bro thak you

Posted by Egitim on December 11, 2010 at 05:22 AM PST #

On my MBP, 2.4G, 2G RAM I get about 85fps with 16 balls in play using your new code, nice job.

Posted by شات on December 15, 2010 at 03:35 AM PST #

On my MBP, 2.4G, 2G RAM I get about 85fps with 16 balls in play using your new code, nice job.http://www.sgamer.com/

Posted by sohu on March 20, 2011 at 11:38 AM PDT #

Thanks guzel :)

Posted by Oyun Oyun on March 28, 2011 at 09:33 PM PDT #

thanks

Posted by kerizim on April 06, 2011 at 07:34 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

user12610627

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today