mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
Removed FnvHash and transformed the rest to FxHashmap (#39233)
This should be the final PR for the Hash Function series that is trivial. Of note: I decided to transform `HashMapTracedValues<Atom,..>` to use FxBuildHasher. This is likely not going to improve performance as Atom's already have a unique u32 that is used as the Hash but it safes a few bytes for the RandomState that is normally in the HashMap. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com> Testing: Hash function changes should not change functionality, we slightly decrease the size and unit tests still work. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
parent
726b456120
commit
84465e7768
55 changed files with 211 additions and 202 deletions
|
@ -26,7 +26,7 @@ crossbeam-channel = { workspace = true }
|
|||
devtools_traits = { workspace = true }
|
||||
embedder_traits = { workspace = true }
|
||||
euclid = { workspace = true }
|
||||
fnv = { workspace = true }
|
||||
rustc-hash = { workspace = true }
|
||||
ipc-channel = { workspace = true }
|
||||
keyboard-types = { workspace = true }
|
||||
malloc_size_of = { workspace = true }
|
||||
|
|
|
@ -32,7 +32,6 @@ use embedder_traits::{
|
|||
MediaSessionActionType, ScriptToEmbedderChan, Theme, ViewportDetails, WebDriverScriptCommand,
|
||||
};
|
||||
use euclid::{Rect, Scale, Size2D, UnknownUnit};
|
||||
use fnv::FnvHashMap;
|
||||
use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
||||
use keyboard_types::Modifiers;
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
|
@ -42,6 +41,7 @@ use net_traits::image_cache::ImageCache;
|
|||
use net_traits::storage_thread::StorageType;
|
||||
use pixels::PixelFormat;
|
||||
use profile_traits::mem;
|
||||
use rustc_hash::FxHashMap;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_config::prefs::PrefValue;
|
||||
use servo_url::{ImmutableOrigin, ServoUrl};
|
||||
|
@ -253,7 +253,7 @@ pub enum ScriptThreadMessage {
|
|||
SetWebGPUPort(IpcReceiver<WebGPUMsg>),
|
||||
/// The compositor scrolled and is updating the scroll states of the nodes in the given
|
||||
/// pipeline via the Constellation.
|
||||
SetScrollStates(PipelineId, FnvHashMap<ExternalScrollId, LayoutVector2D>),
|
||||
SetScrollStates(PipelineId, FxHashMap<ExternalScrollId, LayoutVector2D>),
|
||||
/// Evaluate the given JavaScript and return a result via a corresponding message
|
||||
/// to the Constellation.
|
||||
EvaluateJavaScript(PipelineId, JavaScriptEvaluationId, String),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue