[clangd] Avoid reallocating buffers for each message read:
authorSam McCall <sam.mccall@gmail.com>
Mon, 21 Dec 2020 19:13:19 +0000 (20:13 +0100)
committerSam McCall <sam.mccall@gmail.com>
Wed, 13 Jan 2021 16:40:33 +0000 (17:40 +0100)
commit466acd694861138997d668a3f9cb29aa87bd316e
tree533e756796cc44afed657f2a13ba75bd72ba62b6
parent66d5994bd38a9be4a0c05de2b69f88b64e6845ce
[clangd] Avoid reallocating buffers for each message read:

 - reuse std::string we read messages into
 - when reading line-wise, use SmallVector<128> and read in chunks of 128
   (this affects headers, which are short, and tests, which don't matter)

Differential Revision: https://reviews.llvm.org/D93653
clang-tools-extra/clangd/JSONTransport.cpp