DemoFX - JavaFX examples / benchmarking framework

Chris Newland cnewland at
Mon Mar 9 08:11:50 UTC 2015

Hi all,

I've put together a little framework called DemoFX and a few "demoscene"
graphical effects for measuring JavaFX performance:

Here's a YouTube video of some of the effects I've developed: (watch in HD if you can)

There's an abstract base class that takes care of the setup and measures
frame rate and time spent in the render() method so developing new effects
is quite easy. I plan to add some text-based effects and also some 3D

It's all Canvas based and the effects are rendered with calls to
GraphicsContext. It seems to run at 60fps on modern hardware with the
ES2Pipeline (once it's run enough loops for the JIT compilers to do their

I think I've already found one JavaFX performance problem:

GraphicsContext's strokePolygon(pointsX, pointsY, count) has about half
the performance of the equivalent set of strokeLine(x1, y1, x2, y2)

Example (after building DemoFX with ant)

./ -m line
./ -m poly

Will do a full write-up later.



More information about the openjfx-dev mailing list