diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2017-12-07 21:19:09 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-03-19 18:57:30 +0100 |
commit | c49d98ae780063770fd2e7c0369211fa4e11a70a (patch) | |
tree | 4c6f2f5fc4c364e67fe3501668b34fb3991f094b /desktop | |
parent | dd43ea20eedf3dfbc516065d9dc23c8dab8938a9 (diff) |
sal: add pre-initialization scheme for allocations.
This saves several megabytes of dirtied pages for each LOK
client of Online.
Change-Id: I425a2e7896879f0a64d71fcc0655e9e1fa1256aa
(cherry picked from commit 556e121379494d4bed9738d9c7539ac5afc8f6f4)
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 7 |
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; } |