Julien Thewys (OpenERP) has proposed merging 
lp:~openerp-groupes/openobject-client-web/fix-delayed-ack into 
lp:openobject-client-web.

Requested reviews:
  OpenERP SA's Web Client R&D (openerp-dev-web)

For more details, see:
https://code.launchpad.net/~openerp-groupes/openobject-client-web/fix-delayed-ack/+merge/46541

Everything is in the commit message: we just need TCP_NODELAY between client 
and server.

Windows has 200ms ACK delay by default.  If you deploy client and server on 
different Windows machines, clicking on administration menu (with extended view 
enabled) takes more than 10 seconds to complete (30+ RPC calls).  Other 
operations are also terribly slowed down. With the patch this is simply reduced 
by 200ms times number of RPC calls.
Linux has apparently 40ms ACK delay by default, which is also not negligible.  
I suppose we never experienced the problem because we always deploy client and 
server on the same machine.
I also guess it is overkill to tune this further for the moment.
-- 
https://code.launchpad.net/~openerp-groupes/openobject-client-web/fix-delayed-ack/+merge/46541
Your team OpenERP SA's Web Client R&D is requested to review the proposed merge 
of lp:~openerp-groupes/openobject-client-web/fix-delayed-ack into 
lp:openobject-client-web.
=== modified file 'addons/openerp/utils/tiny_socket.py'
--- addons/openerp/utils/tiny_socket.py	2011-01-17 11:57:11 +0000
+++ addons/openerp/utils/tiny_socket.py	2011-01-17 22:17:53 +0000
@@ -45,6 +45,8 @@
         else:
             self.sock = sock
         self.sock.settimeout(SOCKET_TIMEOUT)
+        # disables Nagle algorithm (avoids 200ms default delay on Windows)
+        self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
 
     def connect(self, host, port=False):
         if not port:

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-web
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-web
More help   : https://help.launchpad.net/ListHelp

Reply via email to