summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2017-12-07 21:19:09 +0000
committerMichael Meeks <michael.meeks@collabora.com>2017-12-15 10:22:03 +0000
commit556e121379494d4bed9738d9c7539ac5afc8f6f4 (patch)
tree26ac1061ee6916376bf2906b3259f5a067c7b3b3 /desktop
parent6d03c1367f0955900194287805324a8b4144e124 (diff)
sal: add pre-initialization scheme for allocations.
This saves several megabytes of dirtied pages for each LOK client of Online. Change-Id: I425a2e7896879f0a64d71fcc0655e9e1fa1256aa
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index f5361bdb834a..2e8d876cb985 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3538,6 +3538,9 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
if (bInitialized)
return 1;
+ if (eStage == PRE_INIT)
+ rtl_alloc_preInit(true);
+
if (eStage != SECOND_INIT)
comphelper::LibreOfficeKit::setActive();
@@ -3689,6 +3692,10 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
fprintf(stderr, "Bootstrapping exception '%s'\n",
OUStringToOString(exception.Message, RTL_TEXTENCODING_UTF8).getStr());
}
+
+ if (eStage == PRE_INIT)
+ rtl_alloc_preInit(false);
+
return bInitialized;
}