Added setTcpNoDelay to AMP connection. On Linux this leads to x10 faster roundtime on sends, as per #746.

This commit is contained in:
Griatch 2015-06-01 23:30:37 +02:00
parent 11750be556
commit a9569f274f
2 changed files with 2 additions and 3 deletions

View file

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

View file

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