From 60627c9f24f5c322c59abee7c8e9e03a2b2ccf5a Mon Sep 17 00:00:00 2001 From: Lee Clagett Date: Fri, 29 May 2020 22:08:19 -0400 Subject: Switch to insitu parsing for ZMQ-JSON; GetBlocksFast reads 13%+ faster --- src/rpc/zmq_server.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rpc/zmq_server.cpp') diff --git a/src/rpc/zmq_server.cpp b/src/rpc/zmq_server.cpp index 6105b7f3a..4028df96a 100644 --- a/src/rpc/zmq_server.cpp +++ b/src/rpc/zmq_server.cpp @@ -158,9 +158,9 @@ void ZmqServer::serve() if (!pub || sockets[2].revents) { - const std::string message = MONERO_UNWRAP(net::zmq::receive(rep.get(), read_flags)); + std::string message = MONERO_UNWRAP(net::zmq::receive(rep.get(), read_flags)); MDEBUG("Received RPC request: \"" << message << "\""); - epee::byte_slice response = handler.handle(message); + epee::byte_slice response = handler.handle(std::move(message)); const boost::string_ref response_view{reinterpret_cast(response.data()), response.size()}; MDEBUG("Sending RPC reply: \"" << response_view << "\""); -- cgit v1.2.3