I'm looking at a broader issue which is the amount of time spent looking up the 
parent chain to resolve a style. My thought is to push parent state down to 
children as CSS is applied. The state would include pseudoclass, font, and 
styles that might need looking up. 

But I like your change. It looks like a good optimization for the style cache. 
I would let it stand alone. 

-----Original Message-----
From: openjfx-dev <openjfx-dev-r...@openjdk.java.net> On Behalf Of Dean Wookey
Sent: Friday, January 29, 2021 1:26 PM
To: openjfx-dev@openjdk.java.net Mailing <openjfx-dev@openjdk.java.net>
Subject: [EXTERNAL] Re: JDK-8177635: Optimise CSS lookup resolution

Hi David,

We experimented with some changes last year which we've been running. We 
haven't noticed any problems and we do get some good memory and speed 
enhancements.. I've been meaning to clean it up before considering a pull 
request, but since this is a delicate area, I've procrastinated a bit in doing 
that.

Here are the changes 
https://github.com/openjdk/jfx/compare/master...DeanWookey:CleanerPseudoClassEnhancements

I could look at redoing the changes cleaner if you think we've taken the right 
approach, else if not, feel free to incorporate any of the ideas in there in 
what you're doing.

Dean


On Fri, Jan 29, 2021 at 5:11 PM Kevin Rushforth <kevin.rushfo...@oracle.com>
wrote:

> Hi David,
>
> That would be great, if a safe fix can be found (I don't need to tell 
> you how fragile the CSS code is when it comes to these sorts of 
> optimizations).
>
> Thanks!
>
> -- Kevin
>
>
> On 1/29/2021 7:02 AM, David Grieve wrote:
> > Anyone mind if I take a crack at 8177635: Optimise CSS lookup resolution?
>
>

Reply via email to