Fabric: Using better::map instead of std::unordered_map in ShadowTreeRegistry

Summary:
Becasue better one is more efficient.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: sammy-SC

Differential Revision: D18626666

fbshipit-source-id: 143dab1dd4c2e168368d2ca14bf2ffc8367d71ea
This commit is contained in:
Valentin Shergin
2019-12-01 19:23:26 -08:00
committed by Facebook Github Bot
parent 58f69ca504
commit bb1f9b23e7
2 changed files with 2 additions and 2 deletions
@@ -12,7 +12,6 @@
#include <react/core/RawValue.h>
#include <memory>
#include <string>
#include <unordered_map>
namespace facebook {
namespace react {
@@ -7,6 +7,7 @@
#pragma once
#include <better/map.h>
#include <better/mutex.h>
#include <react/core/ReactPrimitives.h>
@@ -60,7 +61,7 @@ class ShadowTreeRegistry final {
private:
mutable better::shared_mutex mutex_;
mutable std::unordered_map<SurfaceId, std::unique_ptr<ShadowTree>>
mutable better::map<SurfaceId, std::unique_ptr<ShadowTree>>
registry_; // Protected by `mutex_`.
};