r/java • • Jan 10 '19

JFX Days Zurich 2018: Custom Controls

https://www.youtube.com/watch?v=OuF2BMnCjt4&t=862s
53 Upvotes

4 comments sorted by

5

u/RandomName8 Jan 10 '19

All of this tips about performance to me sounds like javafx is way too expensive/inefficient, the things being displayed are not that complicated, you shouldn't have to drop to canvas for every little thing or "don't modify the scenegraph because everything gets recomputed". Sounds much inferior than a browser in rendering capabilities.

4

u/sievebrain Jan 10 '19

Reducing DOM manipulations is a very standard bit of browser programming advice. ReactJS and friends advertise reducing the amount the DOM is changed as a primary benefit of their entire framework! The FX scene graph is not particularly slow but like changing the DOM in a web app, if there's a ton of elements on screen it will cost you.

1

u/BlueGoliath Jan 12 '19

Reducing DOM manipulations is a very standard bit of browser programming advice.

Which stems from the standard bit of programming advice "Don't use more resources than you actually need". That isn't anything new.

The FX scene graph is not particularly slow but like changing the DOM in a web app, if there's a ton of elements on screen it will cost you.

Compared to a web browser it actually is.

1

u/BlueGoliath Jan 11 '19

It really is. JavaFX can't even keep the app content in sync with the window width/height without graphical glitching. Web browsers have done that for years without issue.