From eaa762c9e3188be456ccba5be2291c5ceb7165ce Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Tue, 23 Feb 2016 22:17:24 +0000 Subject: [PATCH] Tweak idle delays for better performance --- daphne/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daphne/server.py b/daphne/server.py index ab19d11..2f7734a 100755 --- a/daphne/server.py +++ b/daphne/server.py @@ -27,14 +27,14 @@ class Server(object): Run in a separate thread; reads messages from the backend. """ channels = self.factory.reply_channels() - delay = 0.3 + delay = 0.05 # Quit if reactor is stopping if not reactor.running: logging.debug("Backend reader quitting due to reactor stop") return # Don't do anything if there's no channels to listen on if channels: - delay = 0.05 + delay = 0.01 channel, message = self.channel_layer.receive_many(channels, block=False) if channel: delay = 0