RFR: 8377427: Reduce substring allocations in Color.web(String, double) [v7]

Michael Strauß mstrauss at openjdk.org
Tue Feb 17 20:03:24 UTC 2026


On Tue, 17 Feb 2026 19:08:56 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Michael Strauß has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   review comment
>
> modules/javafx.graphics/src/main/java/com/sun/javafx/css/parser/CssNumberParser.java line 303:
> 
>> 301:      * See "Table Generation Script" in "Number Parsing at a Gigabyte per Second" (Lemire, 2021), p. 32
>> 302:      *
>> 303:      * @see <a href="https://arxiv.org/pdf/2101.11408">Number Parsing at a Gigabyte per Second</a>
> 
> is it really worth to go to all that trouble?
> 
> Does the CssParser re-parses the stylesheet every time a Node changes, or does it  parse the stylesheet(s) once and then works with the internal objects to apply the styles?

A stylesheet is not reparsed, but inline styles are when changed. Applications might also swap out stylesheets at runtime. `Color.web()` also seems to be used in `ColorConverter`.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/2069#discussion_r2818817995


More information about the openjfx-dev mailing list