summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-11-18 17:37:53 +0100
committerZolnai Tamás <tamas.zolnai@collabora.com>2014-11-18 17:39:15 +0100
commitdbdacc73ae154237314d599194cc686bd738a9bf (patch)
tree3acf345112daf0fa201fcfab5e5ef6e5016acc32 /svtools
parent7dcfafc7d2f7ce8357c1570ea7547b5879f54172 (diff)
Be honest about the maximum cache size
Implementation uses a multiplicator of ten. I guess the intention here was that to calculate cache size based on the size of the inserted images and not based on the real memory usage (potentionally more instances of one image), which seems a bad idea because it covers the real memory usage from the users (who will be suprised when LO's memory usage increases tenfold of the set value). It seems better to use the exact value in the implementation and increase the default value on the user interface instead. Change-Id: Ie3c0568d3518922d3a9931f894eebb9e7e5515ed
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/graphic/grfmgr2.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index 2ff619254a21..19ab956f499b 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -200,11 +200,7 @@ namespace
void GraphicManager::ImplCheckSizeOfSwappedInGraphics(const GraphicObject* pGraphicToIgnore)
{
// detect maximum allowed memory footprint. Use the user-settings of MaxCacheSize (defaulted
- // to 20MB) and add a decent multiplicator (experimented to find one). Limit to
- // a useful maximum for 32Bit address space
-
- // default is 20MB, so allow 200MB initially
- static sal_uLong aMultiplicator(10);
+ // to 200MB). Limit to a useful maximum for 32Bit address space
// max at 500MB; I experimented with 800 for debug and 750 for non-debug settings (pics start
// missing when office reaches a mem footprint of 1.5GB) but some secure left over space for
@@ -212,7 +208,7 @@ void GraphicManager::ImplCheckSizeOfSwappedInGraphics(const GraphicObject* pGrap
static sal_uLong aMaxSize32Bit(500 * 1024 * 1024);
// calc max allowed cache size
- const sal_uLong nMaxCacheSize(::std::min(GetMaxCacheSize() * aMultiplicator, aMaxSize32Bit));
+ const sal_uLong nMaxCacheSize(::std::min(GetMaxCacheSize(), aMaxSize32Bit));
if(mnUsedSize >= nMaxCacheSize)
{