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:
Родитель
58f69ca504
Коммит
bb1f9b23e7
|
@ -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_`.
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче