mininode: add an optimistic write and disable nagle
commit1817398b397afebcc857c40a16d201c84878cb89
authorCory Fields <cory-nospam-@coryfields.com>
Wed, 13 Sep 2017 17:24:38 +0000 (13 13:24 -0400)
committerCory Fields <cory-nospam-@coryfields.com>
Wed, 13 Sep 2017 17:31:44 +0000 (13 13:31 -0400)
tree6a16153e0fe885496c31844e40079a1adebe43f3
parent96ac26e56627f0c24213fcd3a1cce9fc95f1f661
mininode: add an optimistic write and disable nagle

Because the poll/select loop may pause for 100msec before actually doing a
send, and we have no way to force the loop awake, try sending from the calling
thread if the queue is empty.

Also, disable nagle as all sends should be either full messages or unfinished
sends.

This shaves an average of ~1 minute or so off of my accumulated runtime, and
10-15 seconds off of actual runtime.
test/functional/test_framework/mininode.py