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

Cache shaped text at word granularity #548

Closed
wants to merge 3 commits into from

Conversation

@sethfowler
Copy link
Contributor

sethfowler commented Jun 27, 2013

This PR makes text runs store the results of shaping as a vector of ARC; each element of the vector holds the shaped glyphs for a nonbreakable unit of text (basically a word). This change allows us to cache the shaped glyphs for the words, an approach that Gecko (and probably WebKit) uses. We get pretty good cache hit ratios even on the first run of layout for a page (I saw 62% on Wikipedia's main page today), although a lot of that is due to whitespace. This really comes into its own on subsequent layout runs, though, which are completely cached in the typical case.

@pcwalton

This comment has been minimized.

Copy link

pcwalton commented on 677fce2 Jun 27, 2013

r+

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented on 677fce2 Jun 27, 2013

saw approval from pcwalton
at sethfowler@677fce2

This comment has been minimized.

Copy link
Contributor

bors-servo replied Jun 27, 2013

merging sfowler/servo/glyph-store-cache = 677fce2 into auto

This comment has been minimized.

Copy link
Contributor

bors-servo replied Jun 27, 2013

sfowler/servo/glyph-store-cache = 677fce2 merged ok, testing candidate = 74ab914

This comment has been minimized.

Copy link
Contributor

bors-servo replied Jun 27, 2013

fast-forwarding master to auto = 74ab914

bors-servo pushed a commit that referenced this pull request Jun 27, 2013
This PR makes text runs store the results of shaping as a vector of ARC<GlyphStore>; each element of the vector holds the shaped glyphs for a nonbreakable unit of text (basically a word). This change allows us to cache the shaped glyphs for the words, an approach that Gecko (and probably WebKit) uses. We get pretty good cache hit ratios even on the first run of layout for a page (I saw 62% on Wikipedia's main page today), although a lot of that is due to whitespace. This really comes into its own on subsequent layout runs, though, which are completely cached in the typical case.
@bors-servo bors-servo closed this Jun 27, 2013
ChrisParis pushed a commit to ChrisParis/servo that referenced this pull request Sep 7, 2014
Ignore untracked content in submodules when updating manifest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.