diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-11-25 13:44:21 -0500 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-03-20 12:26:20 +0100 |
commit | 0f3f1bfe679977cbbfffa8f86270d1ef3da77922 (patch) | |
tree | fec45c8d0d759e0cc7a928e33f61afe153657b2e /solenv | |
parent | 1a85bef5cba39f7bd0100c8f43ee3d80e0bbd37c (diff) |
pixman: drop cached glyphs above size watermark
The glyphs cache only tracked the number of glyphs
in the cache, which isn't very useful when the
glyphs vary in size from a few bytes to dozens of
megabytes. In terms of memory footprint, we are
interested not just in the number of cached glyphs,
but also in the total memory usage.
We now track the pixel-size of each glyph and drop
as many as necessary to fall below the set threshold
which is currently 4 MBs.
There was no performance loss observed after this patch
on a diverse set of documents of all types (if anything,
a very modest performance win was hinted in some cases),
with significant memory reduction in some cases where
dozens of megabytes were previously left stale in the cache.
Change-Id: I377a4c1e59611fca6bf253dd9fa90f75b5295d4b
Reviewed-on: https://gerrit.libreoffice.org/45378
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit 407660a08c8df27d7cd44435eefa31bd92364a3c)
(cherry picked from commit ded39dc17a34127a872b11abddc32bbbb5aae047)
Reviewed-on: https://gerrit.libreoffice.org/46987
Tested-by: Jenkins <ci@libreoffice.org>
(cherry picked from commit c8176326324aef63ddc29eafd1193f2abba80c92)
Diffstat (limited to 'solenv')
0 files changed, 0 insertions, 0 deletions