diff options
author | James Wahlin <james.wahlin@10gen.com> | 2016-11-09 14:14:40 -0500 |
---|---|---|
committer | James Wahlin <james.wahlin@10gen.com> | 2016-11-15 14:49:34 -0500 |
commit | e0b312bbe4f2c50470560b92fbcfbdd3e0471d2f (patch) | |
tree | 1c9a133f1f9c6f6f0cf61fee8af3eacff5ee0329 /src/mongo/db/pipeline/document_source.cpp | |
parent | c55f35b894f145d14e7f3b4b431f4139c80a3778 (diff) | |
download | mongo-e0b312bbe4f2c50470560b92fbcfbdd3e0471d2f.tar.gz |
SERVER-26964 Make FieldPath more efficient
Diffstat (limited to 'src/mongo/db/pipeline/document_source.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/document_source.cpp b/src/mongo/db/pipeline/document_source.cpp index b5e5309d9e6..b83ec851ebe 100644 --- a/src/mongo/db/pipeline/document_source.cpp +++ b/src/mongo/db/pipeline/document_source.cpp @@ -110,8 +110,7 @@ std::set<std::string> extractModifiedDependencies(const std::set<std::string>& d // should not be included in the modified dependencies. for (auto&& dependency : dependencies) { bool preserved = false; - auto depAsPath = FieldPath(dependency); - auto firstField = depAsPath.getFieldName(0); + auto firstField = FieldPath::extractFirstFieldFromDottedPath(dependency).toString(); // If even a prefix is preserved, the path is preserved, so search for any prefixes of // 'dependency' as well. 'preservedPaths' is an *ordered* set, so we only have to search the // range ['firstField', 'dependency'] to find any prefixes of 'dependency'. |