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.
This commit is contained in:
Michael Meeks 2016-10-07 17:49:37 +01:00
parent a4b0c22161
commit f5a7a19b95

View file

@ -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;