diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-06 18:46:27 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-07 08:10:49 +0200 |
commit | 1fe08ae6b383c2222178a21c926480a055a87f99 (patch) | |
tree | b3a96a9a1babd0db5b4c4408468fd89369ee9582 | |
parent | f15e6293cf78d67963a6e512f60a11ae58da72c5 (diff) |
tdf#121740 increase DrawingEngine::OLE_Objects cache limit
shaves 5% off the load time for me
Change-Id: Ia0ed8caa9300bfe5bcf71cfe844b8c4fdaf0fef6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133962
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/Common.xcs | 2 | ||||
-rw-r--r-- | sc/qa/unit/subsequent_export_test2.cxx | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index 16d069ffd93a..73b1acbe871d 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -1499,7 +1499,7 @@ page through the objects since they do not always need to be loaded from the hard drive.</desc> </info> - <value>20</value> + <value>200</value> </prop> </group> <group oor:name="Writer"> diff --git a/sc/qa/unit/subsequent_export_test2.cxx b/sc/qa/unit/subsequent_export_test2.cxx index 77b8858fcd97..fa55acdf5160 100644 --- a/sc/qa/unit/subsequent_export_test2.cxx +++ b/sc/qa/unit/subsequent_export_test2.cxx @@ -2696,9 +2696,17 @@ void ScExportTest2::testHyperlinkLocationXLSX() void ScExportTest2::testTdf142264ManyChartsToXLSX() { // The cache size for the test should be small enough, to make sure that some charts get - // unloaded in the process, and then loaded on demand properly (default is currently 20) - CPPUNIT_ASSERT_LESS(sal_Int32(40), - officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::get()); + // unloaded in the process, and then loaded on demand properly (default is currently 200) + comphelper::ScopeGuard g([]() { + std::shared_ptr<comphelper::ConfigurationChanges> pBatch( + comphelper::ConfigurationChanges::create()); + officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::set(200, pBatch); + return pBatch->commit(); + }); + std::shared_ptr<comphelper::ConfigurationChanges> pBatch( + comphelper::ConfigurationChanges::create()); + officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::set(20, pBatch); + pBatch->commit(); ScDocShellRef xDocSh = loadDoc(u"many_charts.", FORMAT_ODS); xDocSh = saveAndReload(*xDocSh, FORMAT_XLSX); |