Commit 8bb021de authored by Matthieu Martin's avatar Matthieu Martin Committed by Facebook Github Bot

RequestContext: revert to F14FastMap

Summary: This reverts my previous change "RequestContext: replace F14FastMap by std::unordred_map"

Reviewed By: ot

Differential Revision: D9280469

fbshipit-source-id: ad3f4d5f520e88ab0e0fab0506d87bab2cd10d41
parent bfdd04bb
......@@ -18,9 +18,9 @@
#include <memory>
#include <string>
#include <unordered_map>
#include <folly/Synchronized.h>
#include <folly/container/F14Map.h>
#include <folly/sorted_vector_types.h>
namespace folly {
......@@ -169,7 +169,8 @@ class RequestContext {
struct State {
// This must be optimized for lookup, its hot path is getContextData
std::unordered_map<std::string, RequestData::SharedPtr> requestData_;
// Efficiency of copying the container also matters in setShallowCopyContext
F14FastMap<std::string, RequestData::SharedPtr> requestData_;
// This must be optimized for iteration, its hot path is setContext
// We also use the fact that it's ordered to efficiently compute
// the difference with previous context
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment