Hey all,
 
I can at least agree from my side that I never saw any project using BSS and I also did not use it myself.
The idea is interesting, but I never had time to see if I can add the css2bss step into the pipeline (doing it manually for every change was no option for me).
 
I have the same thoughts as John: We may can check if there are low hanging fruits or ideas to improve the default CSS parsing. Maybe we then don't need the BSS feature.
It is somewhat similar to the discussion whether to use FXML or writing the UI in plain Java code.
Same here: If there is no big slowdown/disadvantage, I don't see a problem.
 
-- Marius
 
Gesendet: Samstag, 20. Dezember 2025 um 05:56
Von: "Michael Strauß" <[email protected]>
An: openjfx-dev <[email protected]>
Betreff: Removal of binary CSS (BSS)
Hi all,

I ran some numbers on the JavaFX binary CSS (BSS) feature. For the
measurements, I used CssParser to parse modena.css and modena.bss into
a Stylesheet instance.

On a cold start, parsing takes ~150 ms for the CSS file and ~100 ms
for the BSS file (about a 50% improvement for BSS). Using JMH to
benchmark warmed-up performance, I get ~4.4 ms for CSS and ~1.7 ms for
BSS (about 2.6x faster for BSS).

Those results are a meaningful improvement, but the downside is the
added complexity: the binary path introduces non-trivial code that has
to be maintained over time, and it tends to slow down or complicate
new feature work significantly.

My current hypothesis is that this is largely irrelevant for most
applications in practice, because modena.css is likely the only
stylesheet that ever benefits from the binary path. BSS doesn't come
"for free"; projects have to run css2bin as part of their build, and I
suspect most applications won't do that. So in the common case, the
only stylesheet parsed via BSS is Modena, where both modena.css and
its prebuilt modena.bss ship with the JavaFX runtime.

Maybe in 2010, BSS was a meaningful improvement for mobile devices.
But today, these gains are dwarfed by overall JavaFX and JVM startup
time. Removing the binary path would free up development resources for
features that actually matter for JavaFX applications.

Thoughts?

Reply via email to