diff --git a/lib/HttpServer/HttpHandlerFactory.cpp b/lib/HttpServer/HttpHandlerFactory.cpp index 6ee1996e4d..40e0de5c2b 100644 --- a/lib/HttpServer/HttpHandlerFactory.cpp +++ b/lib/HttpServer/HttpHandlerFactory.cpp @@ -243,12 +243,11 @@ HttpHandler* HttpHandlerFactory::createHandler (HttpRequest* request) { return new MaintenanceHandler(request); } - map const& ii = _constructors; + unordered_map const& ii = _constructors; string path = request->requestPath(); - map::const_iterator i = ii.find(path); + auto i = ii.find(path); void* data = nullptr; - // no direct match, check prefix matches if (i == ii.end()) { LOG_TRACE("no direct handler found, trying prefixes"); @@ -335,8 +334,8 @@ HttpHandler* HttpHandlerFactory::createHandler (HttpRequest* request) { // look up data - map const& jj = _datas; - map::const_iterator j = jj.find(path); + unordered_map const& jj = _datas; + auto j = jj.find(path); if (j != jj.end()) { data = j->second; diff --git a/lib/HttpServer/HttpHandlerFactory.h b/lib/HttpServer/HttpHandlerFactory.h index 5976199a82..a22f9aeccc 100644 --- a/lib/HttpServer/HttpHandlerFactory.h +++ b/lib/HttpServer/HttpHandlerFactory.h @@ -249,29 +249,17 @@ namespace triagens { void* _setContextData; -//////////////////////////////////////////////////////////////////////////////// -/// @brief authentication lock for cache -//////////////////////////////////////////////////////////////////////////////// - - basics::ReadWriteLock _authLock; - -//////////////////////////////////////////////////////////////////////////////// -/// @brief authentication cache -//////////////////////////////////////////////////////////////////////////////// - - std::map _authCache; - //////////////////////////////////////////////////////////////////////////////// /// @brief list of constructors //////////////////////////////////////////////////////////////////////////////// - std::map _constructors; + std::unordered_map _constructors; //////////////////////////////////////////////////////////////////////////////// /// @brief list of data pointers for constructors //////////////////////////////////////////////////////////////////////////////// - std::map _datas; + std::unordered_map _datas; //////////////////////////////////////////////////////////////////////////////// /// @brief list of prefix handlers