From 6b7354ae66db40246a09e00aa876443057655a43 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 10 Jul 2015 11:04:50 +0100 Subject: for testing allow disabling configmgr for time critical paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I08021f18d53e1748927f8847649994f95252bbc2 Reviewed-on: https://gerrit.libreoffice.org/17844 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- svtools/source/graphic/grfmgr.cxx | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'svtools') diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index e97cb750f8a0..e39ee4cbdb23 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -184,14 +185,25 @@ void GraphicObject::ImplSetGraphicManager( const GraphicManager* pMgr, const OSt { if( !mpGlobalMgr ) { - mpGlobalMgr = new GraphicManager( - (officecfg::Office::Common::Cache::GraphicManager:: - TotalCacheSize::get()), - (officecfg::Office::Common::Cache::GraphicManager:: - ObjectCacheSize::get())); - mpGlobalMgr->SetCacheTimeout( - officecfg::Office::Common::Cache::GraphicManager:: - ObjectReleaseTime::get()); + if (!utl::ConfigManager::IsAvoidConfig()) + { + mpGlobalMgr = new GraphicManager( + (officecfg::Office::Common::Cache::GraphicManager:: + TotalCacheSize::get()), + (officecfg::Office::Common::Cache::GraphicManager:: + ObjectCacheSize::get())); + mpGlobalMgr->SetCacheTimeout( + officecfg::Office::Common::Cache::GraphicManager:: + ObjectReleaseTime::get()); + } + else + { + mpGlobalMgr = new GraphicManager( + 20000, + 20000); + mpGlobalMgr->SetCacheTimeout( + 20000); + } } mpMgr = mpGlobalMgr; -- cgit