From a9569f274fd57e08229af1398f844912cf03a1b9 Mon Sep 17 00:00:00 2001 From: Griatch Date: Mon, 1 Jun 2015 23:30:37 +0200 Subject: [PATCH] Added setTcpNoDelay to AMP connection. On Linux this leads to x10 faster roundtime on sends, as per #746. --- evennia/server/amp.py | 2 ++ evennia/server/sessionhandler.py | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/evennia/server/amp.py b/evennia/server/amp.py index 5f3fecfcc..508c050ba 100644 --- a/evennia/server/amp.py +++ b/evennia/server/amp.py @@ -255,7 +255,9 @@ class AMPProtocol(amp.AMP): between server and portal. AMP calls it on both sides, so we need to make sure to only trigger resync from the portal side. + """ + self.transport.setTcpNoDelay(True) # this makes for a factor x10 faster sends! if hasattr(self.factory, "portal"): # only the portal has the 'portal' property, so we know we are # on the portal side and can initialize the connection. diff --git a/evennia/server/sessionhandler.py b/evennia/server/sessionhandler.py index 75a253683..dd9d23005 100644 --- a/evennia/server/sessionhandler.py +++ b/evennia/server/sessionhandler.py @@ -52,9 +52,6 @@ _IDLE_TIMEOUT = settings.IDLE_TIMEOUT _MAX_SERVER_COMMANDS_PER_SECOND = 100.0 _MAX_SESSION_COMMANDS_PER_SECOND = 5.0 - -_ERROR_COMMAND_OVERFLOW = "You entered commands too fast. Wait a moment and try again." - def delayed_import(): "Helper method for delayed import of all needed entities" global _ServerSession, _PlayerDB, _ServerConfig, _ScriptDB