pub const SHARING_CACHE_SIZE: usize = 32;
Expand description

The amount of nodes that the style sharing candidate cache should hold at most.

The cache size was chosen by measuring style sharing and resulting performance on a few pages; sizes up to about 32 were giving good sharing improvements (e.g. 3x fewer styles having to be resolved than at size 8) and slight performance improvements. Sizes larger than 32 haven’t really been tested.