[PATCH] D93653: [clangd] Avoid reallocating buffers for each message read:
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 21 11:13:39 PST 2020
sammccall created this revision.
sammccall added a reviewer: njames93.
Herald added subscribers: usaxena95, kadircet, arphaman.
sammccall requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang.
- 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)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D93653
Files:
clang-tools-extra/clangd/JSONTransport.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93653.313159.patch
Type: text/x-patch
Size: 5612 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201221/6f3a53fb/attachment-0001.bin>
More information about the cfe-commits
mailing list