svx/source/svdraw/svdetc.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 2d63a011ed161a01419a40ab2fbb88796d59b20a
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed May 11 13:43:45 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed May 11 21:57:21 2022 +0200

    tdf#121740 just remove OLE_Objects limit for non-32-bit-Windows
    
    shaves 5% off load time
    
    Change-Id: I1893180124ebe86babff1776d77a696ef1e4a190
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134202
    Tested-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 6f4ec03d46ad..929d59e09f4a 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -93,7 +93,15 @@ SdrGlobalData & GetSdrGlobalData() {
 OLEObjCache::OLEObjCache()
 {
     if (!utl::ConfigManager::IsFuzzing())
+    {
+// This limit is only useful on 32-bit windows, where we can run out of 
virtual memory (see tdf#95579)
+// For everything else, we are better off keeping it in main memory rather 
than using our hacky page-out thing
+#if defined _WIN32 && !defined _WIN64
         nSize = 
officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::get();
+#else
+        nSize = SAL_MAX_INT32; // effectively disable the page-out mechanism
+#endif
+    }
     else
         nSize = 100;
     pTimer.reset( new AutoTimer( "svx OLEObjCache pTimer UnloadCheck" ) );

Reply via email to