Switch to insitu parsing for ZMQ-JSON; GetBlocksFast reads 13%+ faster

This commit is contained in:
Lee Clagett 2020-05-29 22:08:19 -04:00
parent fe96e66ebe
commit 60627c9f24
6 changed files with 15 additions and 11 deletions

View file

@ -906,13 +906,13 @@ namespace rpc
return true;
}
epee::byte_slice DaemonHandler::handle(const std::string& request)
epee::byte_slice DaemonHandler::handle(std::string&& request)
{
MDEBUG("Handling RPC request: " << request);
try
{
FullMessage req_full(request, true);
FullMessage req_full(std::move(request), true);
const std::string request_type = req_full.getRequestType();
const auto matched_handler = std::lower_bound(std::begin(handlers), std::end(handlers), request_type);