[Libreoffice-commits] online.git: loolwsd/LOOLWSD.cpp

Michael Meeks michael.meeks at collabora.com
Fri Oct 7 16:53:24 UTC 2016


 loolwsd/LOOLWSD.cpp |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit f5a7a19b95d5f064f327b820182937e351647a1f
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri Oct 7 17:49:37 2016 +0100

    Restore LD_BIND_NOW=1 to share linking.
    
    Finally seen linking on a 'perf top' output, and restored this.
    UnitPrefork shows that it saves memory, and it should save CPU time
    and more memory as the suite is actually used.

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index c41f95a..d11b724 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -49,6 +49,7 @@
 #include <Poco/DOM/Document.h>
 #include <Poco/DOM/Element.h>
 #include <Poco/DOM/NodeList.h>
+#include <Poco/Environment.h>
 #include <Poco/Exception.h>
 #include <Poco/File.h>
 #include <Poco/FileStream.h>
@@ -112,6 +113,7 @@
 
 using namespace LOOLProtocol;
 
+using Poco::Environment;
 using Poco::Exception;
 using Poco::File;
 using Poco::Net::HTMLForm;
@@ -1843,6 +1845,9 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/)
     Util::setTerminationSignals();
     Util::setFatalSignals();
 
+    // down-pay all the forkit linking cost once & early.
+    Environment::set("LD_BIND_NOW", "1");
+
     if (DisplayVersion)
     {
         std::string version, hash;


More information about the Libreoffice-commits mailing list