Change in vdsm[master]: stomp: slow data read when connected from localhost

nsoffer at redhat.com nsoffer at redhat.com
Mon Nov 16 16:02:50 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: stomp: slow data read when connected from localhost
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/48608/1/lib/yajsonrpc/stomp.py
File lib/yajsonrpc/stomp.py:

Line 346
Line 347
Line 348
Line 349
Line 350
This code does not use asyncore api properly.

handle_read should be called *only* by the framework, when a socket is readable.

If you deal with larger packets, and want to be more efficient, increase the buffer size. Buffer size of 32k or more will make your life easier and would also be more efficient (less syscalls).

What you do here is reinventing asynchat. You should use asynchat instead for collecting output until you have a full stomp frame.

See https://docs.python.org/2/library/asynchat.html


-- 
To view, visit https://gerrit.ovirt.org/48608
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I279b2cde25ed9bb42954cf8f72673bd0aad0a6a5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list