mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook Github Bot
parent
58f69ca504
commit
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_`.
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user