HomePhabricator

mininode: add an optimistic write and disable nagle

Description

mininode: add an optimistic write and disable nagle

Summary:
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.

Backport of Core PR11323

Co-authored-by: Jason B. Cox <contact@jasonbcox.com>

Test Plan: test_runner.py --extended

Reviewers: deadalnix, schancel, #bitcoin_abc

Reviewed By: deadalnix, schancel, #bitcoin_abc

Subscribers: teamcity

Differential Revision: https://reviews.bitcoinabc.org/D1962

Details

Provenance
Cory Fields <cory-nospam-@coryfields.com>Authored on Oct 23 2018, 20:18
jasonbcoxCommitted on Oct 25 2018, 22:30
jasonbcoxPushed on Oct 25 2018, 22:30
Reviewer
Restricted Project
Differential Revision
D1962: mininode: add an optimistic write and disable nagle
Parents
rABCb514f80c2ee8: [Qt] Use wallet 0 in rpc console if running with multiple wallets
Branches
Unknown
Tags
Unknown

Event Timeline