summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2017-11-30 18:59:30 +0000
committerAshod Nakashian <ashnakash@gmail.com>2017-12-18 07:17:06 +0100
commit9afbb77b635dc61bd75541adc1eb05f7bceed7cd (patch)
tree4f26d50fc6171b0552f40ed5901c7ae17a4d0f7d /desktop
parent53e79c6eab3566b4c3476a5467370ad103bb6e5e (diff)
sal: add pre-initialization scheme for allocations.
This saves several megabytes of dirtied pages for each LOK client of Online. Change-Id: I425a2e7896879f0a64d71fcc0655e9e1fa1256aa Reviewed-on: https://gerrit.libreoffice.org/46592 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
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 0dc4b38dab6e..dd843e83e68d 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3589,6 +3589,9 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
if (bInitialized)
return 1;
+ if (eStage == PRE_INIT)
+ rtl_alloc_preInit(sal_True);
+
if (eStage != SECOND_INIT)
comphelper::LibreOfficeKit::setActive();
@@ -3729,6 +3732,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(sal_False);
+
return bInitialized;
}