diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-07-10 11:04:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-08-19 01:04:00 +0000 |
commit | 6b7354ae66db40246a09e00aa876443057655a43 (patch) | |
tree | e7eb5d71ecd2a6ec8110945a946549500dae7a8a /svtools | |
parent | 5120b3f30614f6e4988c512577da1d70be8d25b1 (diff) |
for testing allow disabling configmgr for time critical paths
Change-Id: I08021f18d53e1748927f8847649994f95252bbc2
Reviewed-on: https://gerrit.libreoffice.org/17844
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/graphic/grfmgr.cxx | 28 |
1 files changed, 20 insertions, 8 deletions
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 <unotools/ucbstreamhelper.hxx> #include <unotools/localfilehelper.hxx> #include <unotools/tempfile.hxx> +#include <unotools/configmgr.hxx> #include <vcl/svapp.hxx> #include <vcl/cvtgrf.hxx> #include <vcl/metaact.hxx> @@ -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; |