There are two different topics here, both of which are near and dear to my heart (and also make me feel like I've been doing JavaFX for way too long!).

The specific case of TabPane doing CSS / layout on the content of all tabs is something captured here:

https://bugs.openjdk.java.net/browse/JDK-8092206

It dates back to 2012 and I remember spending considerable amount of effort with my team working through this. As can be seen in some of the comments, there were attempts to improve performance (and they were really nice), but the outcome was to back it out as we could not change the default semantics of loading and doing all work on all tabs. The second-to-last comment was a proposal for some API that would specify the policy. I really would like to pick this back up for JDK 10, as JDK 9 is locked and loaded in this regard. I have retargeted this for JDK 10 just now.

As Kevin notes, improving performance is a big push I want to get underway for JDK 10. The more general comment made in your email is - how can we get better performance out of our critical paths (CSS, layout, TableView, etc). That's something we will be actively exploring. There are a lot of ideas, some will yield results and some won't. I've been running into a few of those dead-ends myself recently as I do preliminary investigations.

If anyone is interested in exploring performance-related topics in JavaFX, I've got plenty of areas to explore :-) Ping me off-list and we can discuss.

Unfortunately, again, unless there is some critical oversight these discussions and investigations into performance and additional API are by default targeted to JDK 10 rather than JDK 9.

-- Jonathan

On 20/01/17 11:43 PM, Tom Schindl wrote:
Hi,

One of the biggest problems when working with JavaFX is that if you
reparent a big portion of the SceneGraph is that a full CSS-Pass is
applied on all reparented SG-Nodes even if those nodes are currently not
visible (eg. because they are part of a TabPane).

I general I think it is ok to also applyCSS changes on currently not
visible nodes (eg they still have an influence on layout-bounds) but
there are situations like the above mentioned example of TabPane that it
is unnecessary overhead to apply applyCSS changes on those parts of the
SG until they get visible.

I would not mind if the CSS-Pass on JavaFX would be as performant as the
one from current browsers but unfortunately it isn't so I'd like to
discuss the possibility of a API to *temporarily* exclude portions of
the SG from CSS-Passes.

In JavaFX8 i was able to hack that in by overwriting impl_processCSS in
a subclass who changed to doProcessCSS who now is private so my hack
does not work anymore.

To give you an impression on what performance gains we are talking about
just look at the video I recorded -
https://tomsondev.bestsolution.at/2016/11/25/improving-minmax-performance-in-e4-on-javafx-applications/

Tom


Reply via email to