Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse FontGroup instances on layout's FontContext #196

Closed
burg opened this issue Nov 12, 2012 · 2 comments
Closed

Reuse FontGroup instances on layout's FontContext #196

burg opened this issue Nov 12, 2012 · 2 comments

Comments

@burg
Copy link

@burg burg commented Nov 12, 2012

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.)

@ghost ghost assigned sethfowler Jun 13, 2013
@sethfowler
Copy link
Contributor

@sethfowler sethfowler commented Jun 13, 2013

I've got a patch for this cooked up.

@0b10011
Copy link
Contributor

@0b10011 0b10011 commented Jul 17, 2013

This should be closed now, correct?

@jdm jdm closed this Jul 17, 2013
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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.