diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-13 11:29:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-13 13:44:44 +0200 |
commit | 05867c4e5f6d244f0f18db2a00e6fbc0d8141a41 (patch) | |
tree | 336ea703acc2e0b22b17865b71fadbe53808679e /vcl | |
parent | 5de22d1e559cd0f1f5fa4e247f0ce153710fbeab (diff) |
tdf#80633 speed up dialog layout
some small speedups when opening Format->Paragraph
Change-Id: If97725ecff45b9c2c01b405e153ec05b12882573
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132952
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/image/ImplImageTree.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx index 4c2e63c57cae..3979206cb184 100644 --- a/vcl/source/image/ImplImageTree.cxx +++ b/vcl/source/image/ImplImageTree.cxx @@ -107,10 +107,14 @@ OUString createPath(std::u16string_view name, sal_Int32 pos, std::u16string_view OUString getIconCacheUrl(std::u16string_view sVariant, ImageRequestParameters const & rParameters) { - OUString sUrl = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/" - + rParameters.msStyle + "/" + sVariant + "/" + rParameters.msName; - rtl::Bootstrap::expandMacros(sUrl); - return sUrl; + // the macro expansion can be expensive in bulk, so cache that + static OUString CACHE_DIR = []() + { + OUString sDir = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/"; + rtl::Bootstrap::expandMacros(sDir); + return sDir; + }(); + return CACHE_DIR + rParameters.msStyle + "/" + sVariant + "/" + rParameters.msName; } OUString createIconCacheUrl( |