diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-26 11:48:27 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-26 14:07:12 +0200 |
commit | 573d3bbb7e836216dae6f684f4de77d0e46c50e3 (patch) | |
tree | 6bb26e3510ccc1f93b6bdd375284c35f081c33bc /vcl | |
parent | 54546849a52f2c09c7bae98132d5fbf99f477e95 (diff) |
tdf#97925 writer, slow scrolling large RTF document
this document appears to have just enough fallback fonts on each page to
make the cache useless, so just bump up the size of the cache
considerably, since the cache key/values are really small
Change-Id: I4983de92f66410fee3f04e1e126b2ddb4ec2cbf9
Reviewed-on: https://gerrit.libreoffice.org/74735
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/fontmanager/fontsubst.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/unx/generic/fontmanager/fontsubst.cxx b/vcl/unx/generic/fontmanager/fontsubst.cxx index 034f77bc7be5..3bc44314115d 100644 --- a/vcl/unx/generic/fontmanager/fontsubst.cxx +++ b/vcl/unx/generic/fontmanager/fontsubst.cxx @@ -145,9 +145,10 @@ bool FcPreMatchSubstitution::FindFontSubstitute(FontSelectPattern &rFontSelData) if( bHaveSubstitute ) { rCachedFontMap.push_front(value_type(rFontSelData, aOut)); - //fairly arbitrary limit in this case, but I recall measuring max 8 - //fonts as the typical max amount of fonts in medium sized documents - if (rCachedFontMap.size() > 8) + // Fairly arbitrary limit in this case, but I recall measuring max 8 + // fonts as the typical max amount of fonts in medium sized documents, so make it + // a fair chunk larger to accomodate weird documents./ + if (rCachedFontMap.size() > 256) rCachedFontMap.pop_back(); rFontSelData = aOut; } |