diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-04-01 10:00:52 -0600 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-04-01 10:00:52 -0600 |
commit | ba0d28e0023fce2003d64b9caf97fcdbeb7cdb28 (patch) | |
tree | 0ae3e3ac81eabd2a957a45293b8041ac5a470472 /components/script/layout_interface.rs | |
parent | 6824bc93241d8ad6eff30e5014d27b88ea8a65d7 (diff) | |
parent | 750bbed2cbdd37677b9298c86e20fb6a2db33b23 (diff) | |
download | servo-ba0d28e0023fce2003d64b9caf97fcdbeb7cdb28.tar.gz servo-ba0d28e0023fce2003d64b9caf97fcdbeb7cdb28.zip |
auto merge of #5278 : pcwalton/servo/font-group-caching, r=glennw
There are several optimizations here:
* We make font families atoms, to allow for quicker comparisons.
* We precalculate an FNV hash of the relevant fields of the font style
structure.
* When obtaining a platform font group, we first check pointer equality
for the font style. If there's no match, we go to the FNV hash. Only
if both caches miss do we construct and cache a font group. Note that
individual fonts are *also* cached; thus there are two layers of
caching here.
15% improvement in total layout thread time for Facebook Timeline.
r? @glennw (since you last worked on `get_layout_font_group_for_style()` IIRC)
Diffstat (limited to 'components/script/layout_interface.rs')
0 files changed, 0 insertions, 0 deletions