JavaFX1.2的性能貌似有了很大的提升

[url=http://weblogs.java.net/blog/opinali/archive/2009/06/first_look_at_j.html]Osvaldo Pinali Doederlein's Blog[/url]中提到,作者使用[url=http://bubblemark.com/]Bubblemark[/url]进行了一个简单的测试,JavaFX的性能较JavaFX1.1有了~16倍的提升,虽然比Swing还差一些,但已经可以接受(比Flash&Silverlight好很多)。
[quote]Performance Results

Now let’s move to the fun part. These are my preliminary results with this “beta” JavaFX Balls code, running on the JavaFX 1.2 runtime:

* 16 Balls: 665fps (1.1 = 340fps; 1.2 is 1.95X faster)
* 128 Balls: 330fps (1.1 = 20fps; 1.2 is 16.5X faster)
* Adaptive mode (200fps): 221 Balls (1.1 = 30 Balls; 1.2 handles 7,3X more load). I could also get 560 Balls @ 60fps.
* Mobile (emulated), Adaptive mode (25fps): 91 Balls (1.1 = 82 Balls; 1.2 handles 11% more load)

JavaFX 1.2 has a completely rewritten animation core, and it shows. When I evaluated JavaFX 1.0, I complained and cried and whined about the poor scalability of its SceneGraph package, with the conclusion that JavaFX would “stand no chance” to implement serious animations (e.g. for action games, except for clones of trivial 1970's hits like Pac-Man). But this is now past.

The performance can be even bigger in a “pure” animation: I found that the controls are relatively heavyweight (even with caching). If I remove the control toolbar, I get 16 Balls @ 992fps (almost reaching the 1000fps cap), or 128 Balls @ 380fps. Even more interesting is CPU usage: the 16 Balls score consumed less than 1% CPU (Q6600), and even the 128 Balls score consumed only 16% CPU. So the program is clearly not constrained by CPU, but rather by other factors like timers or VRAM/DRAM bandwidth.

These results compare very favorably with most other Bubblemark contenders (both Java and other platforms). The very best score that I’ve seen before was for PulpCore: it scores 16 Balls @ 410fps, but 128 Balls @ 90fps only; and both saturated a full CPU core (25% of a quad-core). [color=red]I tested again other competitors (including Flash and Silverlight 2), and they are all much worse than JavaFX in either FPS or CPU usage (often both).[/color]
[/quote]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值