diff options
author | Adam Midvidy <amidvidy@gmail.com> | 2015-11-13 17:36:27 -0500 |
---|---|---|
committer | Adam Midvidy <amidvidy@gmail.com> | 2015-11-17 16:42:14 -0500 |
commit | 8344af630c5113ab2f9cf2950c384ad926966ff9 (patch) | |
tree | ab41398a0c66a4db870ebf8ef105ce172b192754 /src/mongo/db/geo | |
parent | d2adb8eda7fae11b423696e1101e7d0642e19895 (diff) | |
download | mongo-8344af630c5113ab2f9cf2950c384ad926966ff9.tar.gz |
SERVER-21459 reserve bytes in ReplyBuilder buffer to avoid excessive reallocing
Diffstat (limited to 'src/mongo/db/geo')
-rw-r--r-- | src/mongo/db/geo/haystack.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/geo/haystack.cpp b/src/mongo/db/geo/haystack.cpp index 2caef7bc87e..23c537534c5 100644 --- a/src/mongo/db/geo/haystack.cpp +++ b/src/mongo/db/geo/haystack.cpp @@ -43,6 +43,7 @@ #include "mongo/db/index/index_descriptor.h" #include "mongo/db/index_names.h" #include "mongo/db/jsobj.h" +#include "mongo/db/query/find_common.h" /** * Examines all documents in a given radius of a given point. @@ -74,6 +75,10 @@ public: return true; } + std::size_t reserveBytesForReply() const override { + return FindCommon::kInitReplyBufferSize; + } + virtual void addRequiredPrivileges(const std::string& dbname, const BSONObj& cmdObj, std::vector<Privilege>* out) { |