mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
perf: use absl::flat_hash_map instead of std::unordered_map (#46202)
* perf: make ElectronUsbDelegate::controller_map_ an absl::flat_hash_map * perf: make ElectronSerialDelegate::controller_map_ an absl::flat_hash_map * perf: make ElectronHidDelegate::controller_map_ an absl::flat_hash_map * perf: make FrameTreeNodeIdMap an absl::flat_hash_map * perf: make AutofillDriverFactory::driver_map_ an absl::flat_hash_map * perf: make asar::Archive::external_files_ an absl::flat_hash_map * perf: make VersionIdMap an absl::flat_hash_map * perf: make ObjectCache::proxy_map_ an absl::flat_hash_map * docs: add TODO to investigate absl map in KeyWeakMap
This commit is contained in:
@@ -5,8 +5,7 @@
|
||||
#ifndef ELECTRON_SHELL_RENDERER_API_CONTEXT_BRIDGE_OBJECT_CACHE_H_
|
||||
#define ELECTRON_SHELL_RENDERER_API_CONTEXT_BRIDGE_OBJECT_CACHE_H_
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
#include "third_party/abseil-cpp/absl/container/flat_hash_map.h"
|
||||
#include "v8/include/v8-local-handle.h"
|
||||
#include "v8/include/v8-object.h"
|
||||
|
||||
@@ -35,7 +34,7 @@ class ObjectCache final {
|
||||
};
|
||||
|
||||
// from_object ==> proxy_value
|
||||
std::unordered_map<v8::Local<v8::Object>, v8::Local<v8::Value>, Hash>
|
||||
absl::flat_hash_map<v8::Local<v8::Object>, v8::Local<v8::Value>, Hash>
|
||||
proxy_map_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user