Page MenuHomePhabricator

mininode: add an optimistic write and disable nagle
ClosedPublic

Authored by jasonbcox on Oct 23 2018, 20:57.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
pr11323-mininode-perf
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3667
Build 5409: Bitcoin ABC Buildbot (legacy)
Build 5408: arc lint + arc unit

Event Timeline

deadalnix requested changes to this revision.Oct 24 2018, 23:19

Please edit description to mention PR11323 so it can be grepped for.

This revision now requires changes to proceed.Oct 24 2018, 23:19
jasonbcox edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Oct 25 2018, 21:58
This revision was automatically updated to reflect the committed changes.