gngr
gngr copied to clipboard
Optimise Element.hasHoverStyle()
Whenever mouse is hovered over an element, it and its descendants are invalidated.
This is extremely inefficient.
Raised an upstream request to help with this.
First round of optimisation is done.
More optimisations are possible:
- Cache the result of hasHoverStyle()
- Cache the boolean: descendant has hover styles.
See also #121