Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upReuse FontGroup instances on layout's FontContext #196
Comments
|
I've got a patch for this cooked up. |
|
This should be closed now, correct? |
ChrisParis
pushed a commit
to ChrisParis/servo
that referenced
this issue
Sep 7, 2014
Update the test of ShadowDOM::distributed() pseudo-element
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The mapping is
hash(style + 'font-family' property value) ---> FontGroup. If this isn't cached, then for every textrun we have to dig through the FontList to find the correct fonts. In the vast majority of cases, we should be reusing a small set of font groups.I think we could use a small fixed-size LRU cache for this. (This could be done with a hashtable if we had a notion of weak references.)