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?
