Use MSG_MORE instead of 2 setsockopt calls on every AsyncSSLSocket write.
authorKyle Nekritz <knekritz@fb.com>
Mon, 31 Oct 2016 15:09:06 +0000 (08:09 -0700)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Mon, 31 Oct 2016 15:23:28 +0000 (08:23 -0700)
commite0277a6c481b03ebcfc30369321f25f5891b4a3f
treea38dc65a72b4ecab8199ee4ac60a84f3f2a45212
parent81d9192f8afdf53fcbc7bf572f8ce638516380f8
Use MSG_MORE instead of 2 setsockopt calls on every AsyncSSLSocket write.

Summary: Previously we set the cork option on the socket before making multiple writes, and then unset it after, which elip found was hurting perf with 2 extra syscalls. The cork logic was also not the same as the buffer combining logic, which made us often set cork even when only doing one write.

Reviewed By: djwatson

Differential Revision: D4058357

fbshipit-source-id: 1a07447ff5e027751e455a2403e0042bf67cb1c5
folly/io/async/AsyncSSLSocket.cpp
folly/io/async/AsyncSSLSocket.h