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:21:29 -08:00 коммит произвёл Facebook Github Bot
Родитель 58f69ca504
Коммит bb1f9b23e7
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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_`.
};