Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v9]

2024-03-11 Thread Andy Goryachev
On Mon, 11 Mar 2024 17:25:26 GMT, John Hendrikx wrote: >> John Hendrikx has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Move getStyleClassNames to location it was introduced to reduce diff > > I think its /csroff or something... @hjohn

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v9]

2024-03-11 Thread Kevin Rushforth
On Mon, 11 Mar 2024 16:54:25 GMT, John Hendrikx wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2).

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v9]

2024-03-11 Thread John Hendrikx
On Mon, 11 Mar 2024 16:54:25 GMT, John Hendrikx wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2).

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v5]

2024-03-11 Thread Andy Goryachev
On Sat, 9 Mar 2024 06:08:34 GMT, John Hendrikx wrote: >> modules/javafx.graphics/src/main/java/com/sun/javafx/css/FixedCapacitySet.java >> line 96: >> >>> 94: : maximumCapacity == 2 ? new Duo<>() >>> 95: : maximumCapacity < 10 ? new Hashless<>(maximumCapacity) >>>

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v9]

2024-03-11 Thread Andy Goryachev
On Mon, 11 Mar 2024 16:54:25 GMT, John Hendrikx wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2).

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v8]

2024-03-11 Thread John Hendrikx
On Mon, 11 Mar 2024 16:47:14 GMT, John Hendrikx wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2).

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v9]

2024-03-11 Thread John Hendrikx
> Improves performance of selector matching in the CSS subsystem. This is done > by using custom set implementation which are highly optimized for the most > common cases where the number of selectors is small (most commonly 1 or 2). > It also should be more memory efficient for medium sized

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v8]

2024-03-11 Thread John Hendrikx
> Improves performance of selector matching in the CSS subsystem. This is done > by using custom set implementation which are highly optimized for the most > common cases where the number of selectors is small (most commonly 1 or 2). > It also should be more memory efficient for medium sized

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v5]

2024-03-11 Thread Kevin Rushforth
On Mon, 11 Mar 2024 16:23:46 GMT, Andy Goryachev wrote: >> I'd like someone else to weigh in on this. If this were a `Set` that >> eventually would be publicly accessible somewhere (by normal FX users) I'd >> definitely not want this. In this case however, it is (for now at least) >> only

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v7]

2024-03-11 Thread Kevin Rushforth
On Sat, 9 Mar 2024 13:46:08 GMT, John Hendrikx wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2). >>

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v6]

2024-03-11 Thread Kevin Rushforth
On Sat, 9 Mar 2024 13:42:55 GMT, John Hendrikx wrote: >> modules/javafx.graphics/src/main/java/javafx/css/StyleClass.java line 32: >> >>> 30: * @deprecated for removal >>> 31: */ >>> 32: public final class StyleClass { >> >> Needs the `@Deprecated(forRemoval = true)` annotation on the class,

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v5]

2024-03-11 Thread Andy Goryachev
On Mon, 11 Mar 2024 16:01:13 GMT, John Hendrikx wrote: >> But it is somewhat visible: **public** `void freeze();` (although it cannot >> be invoked directly). >> >> Edit: While I accept your reasoning that the functionality is effectively >> hidden from the user, I still think that the

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v5]

2024-03-11 Thread John Hendrikx
On Mon, 11 Mar 2024 14:54:45 GMT, Andy Goryachev wrote: >> I'm not against adding an explanation, but it's not needed as this is part >> of the `Set` contract (sets that can't be modified are specified to throw >> `UnsupportedOperationException`), for example for `add` in `Set`: >> >> *

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v5]

2024-03-11 Thread Andy Goryachev
On Sat, 9 Mar 2024 05:26:33 GMT, John Hendrikx wrote: >> modules/javafx.graphics/src/main/java/com/sun/javafx/css/FixedCapacitySet.java >> line 135: >> >>> 133: protected final void ensureNotFrozen() { >>> 134: if (frozen) { >>> 135: throw new

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v6]

2024-03-09 Thread John Hendrikx
On Sat, 9 Mar 2024 12:35:22 GMT, Nir Lisker wrote: >> John Hendrikx has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Remove commented code in BitSetTest >> - Remove unnecessary addAll overrides > >

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v7]

2024-03-09 Thread John Hendrikx
> Improves performance of selector matching in the CSS subsystem. This is done > by using custom set implementation which are highly optimized for the most > common cases where the number of selectors is small (most commonly 1 or 2). > It also should be more memory efficient for medium sized

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v6]

2024-03-09 Thread Nir Lisker
On Sat, 9 Mar 2024 06:48:25 GMT, John Hendrikx wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2). >>

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v6]

2024-03-08 Thread John Hendrikx
> Improves performance of selector matching in the CSS subsystem. This is done > by using custom set implementation which are highly optimized for the most > common cases where the number of selectors is small (most commonly 1 or 2). > It also should be more memory efficient for medium sized

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v5]

2024-03-08 Thread John Hendrikx
On Sat, 9 Mar 2024 00:04:04 GMT, Andy Goryachev wrote: >> John Hendrikx has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Optimize performance of OpenAddressed Set just in case it is ever used > >

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v5]

2024-03-08 Thread John Hendrikx
On Fri, 8 Mar 2024 23:46:16 GMT, Andy Goryachev wrote: >> John Hendrikx has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Optimize performance of OpenAddressed Set just in case it is ever used > >

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v5]

2024-03-08 Thread John Hendrikx
On Fri, 8 Mar 2024 23:26:05 GMT, Andy Goryachev wrote: >> John Hendrikx has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Optimize performance of OpenAddressed Set just in case it is ever used > >

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v5]

2024-03-08 Thread John Hendrikx
On Fri, 8 Mar 2024 23:17:28 GMT, Andy Goryachev wrote: >> John Hendrikx has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Optimize performance of OpenAddressed Set just in case it is ever used > >

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v5]

2024-03-08 Thread John Hendrikx
On Fri, 8 Mar 2024 23:14:12 GMT, Andy Goryachev wrote: >> John Hendrikx has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Optimize performance of OpenAddressed Set just in case it is ever used > >

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v5]

2024-03-08 Thread Andy Goryachev
On Sun, 25 Feb 2024 22:28:12 GMT, John Hendrikx wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2).

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v5]

2024-03-08 Thread Marius Hanl
On Sun, 25 Feb 2024 22: 28: 12 GMT, John Hendrikx wrote: >> Improves performance of selector matching in the CSS subsystem. This is done by using custom set implementation which are highly optimized for the ZjQcmQRYFpfptBannerStart This Message Is From an External

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v5]

2024-02-25 Thread John Hendrikx
> Improves performance of selector matching in the CSS subsystem. This is done > by using custom set implementation which are highly optimized for the most > common cases where the number of selectors is small (most commonly 1 or 2). > It also should be more memory efficient for medium sized

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v4]

2024-02-25 Thread John Hendrikx
> Improves performance of selector matching in the CSS subsystem. This is done > by using custom set implementation which are highly optimized for the most > common cases where the number of selectors is small (most commonly 1 or 2). > It also should be more memory efficient for medium sized

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v4]

2024-02-25 Thread John Hendrikx
On Mon, 15 Jan 2024 20:48:54 GMT, Michael Strauß wrote: >> @mstr2 I've created #1333 to show how it would look when we move >> `SimpleSelector` and `CompoundSelector` to internal packages. I think that >> should alleviate most concerns, and we can either integrate this first with >> a new

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v3]

2024-02-17 Thread Kevin Rushforth
On Thu, 15 Feb 2024 13:33:23 GMT, John Hendrikx wrote: >> John Hendrikx has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix wrong exception name in javadoc > > I think we can continue with this one, now that #1340 is done. @hjohn

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v3]

2024-02-15 Thread John Hendrikx
On Sun, 14 Jan 2024 14:32:49 GMT, John Hendrikx wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2).

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v3]

2024-01-15 Thread Michael Strauß
On Sun, 14 Jan 2024 15:14:36 GMT, John Hendrikx wrote: >> If this method is not used anywhere, why do we need to expose >> `getStyleClassNames()` as new API to replace this one? I'm a bit puzzled by >> that, especially since you're saying that the API shouldn't be used. Why >> create

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v3]

2024-01-14 Thread John Hendrikx
On Sun, 14 Jan 2024 04:20:56 GMT, Michael Strauß wrote: >> This is possible, although `List#get` would not perform too well when it is >> implemented for `FixedCapacitySet.OpenAddressed` as the array used as hash >> table in this class can have gaps (so we'd need to iterate to find the >>

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v3]

2024-01-14 Thread John Hendrikx
> Improves performance of selector matching in the CSS subsystem. This is done > by using custom set implementation which are highly optimized for the most > common cases where the number of selectors is small (most commonly 1 or 2). > It also should be more memory efficient for medium sized

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v2]

2024-01-14 Thread John Hendrikx
On Sun, 14 Jan 2024 04:58:35 GMT, John Hendrikx wrote: >> If this method is not used anywhere, why do we need to expose >> `getStyleClassNames()` as new API to replace this one? I'm a bit puzzled by >> that, especially since you're saying that the API shouldn't be used. Why >> create

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v2]

2024-01-13 Thread John Hendrikx
On Sun, 14 Jan 2024 04:20:56 GMT, Michael Strauß wrote: >> This is possible, although `List#get` would not perform too well when it is >> implemented for `FixedCapacitySet.OpenAddressed` as the array used as hash >> table in this class can have gaps (so we'd need to iterate to find the >>

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v2]

2024-01-13 Thread Michael Strauß
On Fri, 5 Jan 2024 01:32:04 GMT, John Hendrikx wrote: >> modules/javafx.graphics/src/main/java/javafx/css/SimpleSelector.java line 81: >> >>> 79: * @deprecated for future removal, use {@link >>> #getStyleClassNames()} instead >>> 80: */ >>> 81: public List getStyleClasses() { >>

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v2]

2024-01-12 Thread John Hendrikx
On Fri, 12 Jan 2024 12:20:22 GMT, Marius Hanl wrote: >> Thanks for having a look, it's good to have some more use cases from other >> applications! The sets are used both for the style classes on `Node`s but >> also the set of style classes in CSS selectors (multiple style classes in >>

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v2]

2024-01-12 Thread Marius Hanl
On Thu, 11 Jan 2024 22:36:58 GMT, John Hendrikx wrote: >> modules/javafx.graphics/src/main/java/com/sun/javafx/css/FixedCapacitySet.java >> line 94: >> >>> 92: return maximumCapacity == 0 ? empty() >>> 93: : maximumCapacity == 1 ? new Single<>() >>> 94: :

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v2]

2024-01-11 Thread Kevin Rushforth
On Thu, 11 Jan 2024 22:59:33 GMT, Andy Goryachev wrote: >> I can undo the rename so they're not touched. My problem with fixing this >> is that I then also should do it for `CompoundSelector`, which is just >> completely unrelated to the intent of this PR. I'm pretty sure that within >>

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v2]

2024-01-11 Thread Andy Goryachev
On Thu, 11 Jan 2024 22:50:32 GMT, John Hendrikx wrote: >> you are right, this code does not affect performance (I could not hit a >> break point here either). >> still, since you are touching these lines, why not do it right? > > I can undo the rename so they're not touched. My problem with

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v2]

2024-01-11 Thread John Hendrikx
On Mon, 8 Jan 2024 19:24:14 GMT, Andy Goryachev wrote: >> I am confused, and maybe I am missing something. As far as I know, this >> method is not called anywhere. I put a breakpoint in it. JavaFX does not use >> this method anywhere, nor are Selectors ever used as keys in Sets or Maps. >> >>

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v2]

2024-01-11 Thread John Hendrikx
On Thu, 11 Jan 2024 09:33:09 GMT, Marius Hanl wrote: >> John Hendrikx has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains eight additional >>

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v2]

2024-01-11 Thread Marius Hanl
On Fri, 5 Jan 2024 01:45:56 GMT, John Hendrikx wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2). >>

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v2]

2024-01-08 Thread Andy Goryachev
On Mon, 8 Jan 2024 19:15:31 GMT, John Hendrikx wrote: >> these lines discard about 4.5 bits of information on each step, surely that >> will affect performance, no? > > I am confused, and maybe I am missing something. As far as I know, this > method is not called anywhere. I put a breakpoint

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v2]

2024-01-08 Thread John Hendrikx
On Mon, 8 Jan 2024 16:22:42 GMT, Andy Goryachev wrote: >> I agree that it is not nice :) However, changing this seems out of scope >> for this PR as my changes are unrelated to this, and I didn't even touch >> `CompoundSelector`. As selectors are never stored in sets/maps, it is hard >> to

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v2]

2024-01-08 Thread Andy Goryachev
On Mon, 8 Jan 2024 16:19:05 GMT, John Hendrikx wrote: >> modules/javafx.graphics/src/main/java/javafx/css/SimpleSelector.java line >> 382: >> >>> 380: hash = 31 * (hash + name.hashCode()); >>> 381: hash = 31 * (hash + selectorStyleClassNames.hashCode()); >>> 382: hash =

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v2]

2024-01-08 Thread John Hendrikx
On Mon, 8 Jan 2024 16:01:01 GMT, Andy Goryachev wrote: >> John Hendrikx has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains eight additional >>

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v2]

2024-01-08 Thread Andy Goryachev
On Fri, 5 Jan 2024 01:45:56 GMT, John Hendrikx wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2). >>

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching

2024-01-06 Thread John Hendrikx
It's a very nice application, I had never seen it before.  As the original bug was reported against it that caused a performance regression, I started using it to also test a potential performance improvement.  Although I think it does a back-end call every time I "refresh", so I might have

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v2]

2024-01-04 Thread John Hendrikx
On Thu, 4 Jan 2024 13:38:31 GMT, Nir Lisker wrote: >> John Hendrikx has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains eight additional >> commits

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching [v2]

2024-01-04 Thread John Hendrikx
> Improves performance of selector matching in the CSS subsystem. This is done > by using custom set implementation which are highly optimized for the most > common cases where the number of selectors is small (most commonly 1 or 2). > It also should be more memory efficient for medium sized

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching

2024-01-04 Thread John Hendrikx
On Thu, 4 Jan 2024 15:28:45 GMT, Michael Strauß wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2).

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching

2024-01-04 Thread John Hendrikx
On Thu, 4 Jan 2024 14:23:14 GMT, Nir Lisker wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2). >> It

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching

2024-01-04 Thread John Hendrikx
On Thu, 4 Jan 2024 14:17:48 GMT, Nir Lisker wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2). >> It

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching

2024-01-04 Thread John Hendrikx
On Thu, 4 Jan 2024 13:57:16 GMT, Nir Lisker wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2). >> It

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching

2024-01-04 Thread John Hendrikx
On Thu, 4 Jan 2024 13:53:28 GMT, Nir Lisker wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2). >> It

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching

2024-01-04 Thread Dirk Lemmermann
I truly love the fact that you guys are starting to use JFXCentral for benchmarking / testing :-) If anyone encounters things bad for performance unrelated to JavaFX itself but caused by JFXCentral then please let me know. Dirk > Am 04.01.2024 um 13:31 schrieb John Hendrikx : > > Improves

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching

2024-01-04 Thread Michael Strauß
On Thu, 4 Jan 2024 12:21:15 GMT, John Hendrikx wrote: > Improves performance of selector matching in the CSS subsystem. This is done > by using custom set implementation which are highly optimized for the most > common cases where the number of selectors is small (most commonly 1 or 2). > It

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching

2024-01-04 Thread Kevin Rushforth
On Thu, 4 Jan 2024 12:21:15 GMT, John Hendrikx wrote: > Improves performance of selector matching in the CSS subsystem. This is done > by using custom set implementation which are highly optimized for the most > common cases where the number of selectors is small (most commonly 1 or 2). > It

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching

2024-01-04 Thread Kevin Rushforth
On Thu, 4 Jan 2024 14:23:14 GMT, Nir Lisker wrote: >> Improves performance of selector matching in the CSS subsystem. This is done >> by using custom set implementation which are highly optimized for the most >> common cases where the number of selectors is small (most commonly 1 or 2). >> It

Re: RFR: JDK-8322964 Optimize performance of CSS selector matching

2024-01-04 Thread Nir Lisker
On Thu, 4 Jan 2024 12:21:15 GMT, John Hendrikx wrote: > Improves performance of selector matching in the CSS subsystem. This is done > by using custom set implementation which are highly optimized for the most > common cases where the number of selectors is small (most commonly 1 or 2). > It

RFR: JDK-8322964 Optimize performance of CSS selector matching

2024-01-04 Thread John Hendrikx
Improves performance of selector matching in the CSS subsystem. This is done by using custom set implementation which are highly optimized for the most common cases where the number of selectors is small (most commonly 1 or 2). It also should be more memory efficient for medium sized and large