mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-02 15:30:55 +00:00
Tiny optimization to prealloc string space.
This commit is contained in:
parent
fde99e2fcf
commit
625e3e8e25
@ -1056,6 +1056,7 @@ unsigned int EmbeddedNetworkController::handleControlPlaneHttpPOST(
|
|||||||
std::string pong("{\"memberStatus\":{");
|
std::string pong("{\"memberStatus\":{");
|
||||||
{
|
{
|
||||||
Mutex::Lock _l(_memberStatus_m);
|
Mutex::Lock _l(_memberStatus_m);
|
||||||
|
pong.reserve(64 * _memberStatus.size());
|
||||||
_db.eachId([this,&pong,&now,&first](uint64_t networkId,uint64_t nodeId) {
|
_db.eachId([this,&pong,&now,&first](uint64_t networkId,uint64_t nodeId) {
|
||||||
char tmp[64];
|
char tmp[64];
|
||||||
uint64_t lrt = 0ULL;
|
uint64_t lrt = 0ULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user