I find the labrad system takes a long time transfer a large packet, which is noted in the issue #220.
With the same test written by @maffoo , I test this new packetStream, with the following code.
def setting_time(n, cxn, server='manager'):
s = bytes(bytearray(n))
ti = time.time()
cxn[server].echo(s)
te = time.time()
return te - ti
def main()
print("Manager: ")
with labrad.connect() as cxn:
for x in range(20, 30):
print(x, setting_time(2**x, cxn))
print("Test Server: ")
with labrad.connect() as cxn:
for x in range(20, 30):
print(x, setting_time(2**x, cxn, server='python_test_server'))
main()
I find the labrad system takes a long time transfer a large packet, which is noted in the issue #220. With the same test written by @maffoo , I test this new packetStream, with the following code.
Here is the result:
The old packetStream (using bytes) (only to 2**26, as it takes too much time)