diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-14 23:47:13 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-19 15:47:01 +0200 |
commit | 3da1452bbec099d76705e9b3b2f7a6cfe83903bb (patch) | |
tree | f1550ba486566e39203945aeff4d5d97caaac656 /documentapi | |
parent | bbcbd0c689119bd24c699996d26523ba99cdf78b (diff) |
pre-size bucket vector to avoid reallocation
Diffstat (limited to 'documentapi')
-rw-r--r-- | documentapi/src/vespa/documentapi/messagebus/routablefactories51.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/documentapi/src/vespa/documentapi/messagebus/routablefactories51.cpp b/documentapi/src/vespa/documentapi/messagebus/routablefactories51.cpp index d8c0af41978..2eb539c7d3d 100644 --- a/documentapi/src/vespa/documentapi/messagebus/routablefactories51.cpp +++ b/documentapi/src/vespa/documentapi/messagebus/routablefactories51.cpp @@ -70,6 +70,7 @@ RoutableFactories51::CreateVisitorMessageFactory::doDecode(document::ByteBuffer msg.setMaximumPendingReplyCount(decodeInt(buf)); int32_t len = decodeInt(buf); + msg.getBuckets().reserve(len); for (int32_t i = 0; i < len; i++) { int64_t val; buf.getLong(val); // NOT using getLongNetwork |