mirror of
https://github.com/servo/servo.git
synced 2025-09-27 15:20:09 +01:00
constellation: Use FnvHashMap
for hashmaps that use ids as keys (#39106)
FNV is faster for hashing less than 16 bytes of data and the cryptographic properties of the default HashMap are not needed for the various ids. Testing: This does not change functionality. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
parent
0ae9ee28d5
commit
5c7ea4bdee
19 changed files with 71 additions and 54 deletions
|
@ -28,6 +28,7 @@ use crossbeam_channel::Sender;
|
|||
use dpi::PhysicalSize;
|
||||
use embedder_traits::{CompositorHitTestResult, InputEvent, ShutdownState, ViewportDetails};
|
||||
use euclid::{Point2D, Rect, Scale, Size2D, Transform3D};
|
||||
use fnv::FnvHashMap;
|
||||
use ipc_channel::ipc::{self, IpcSharedMemory};
|
||||
use log::{debug, info, trace, warn};
|
||||
use pixels::{CorsStatus, ImageFrame, ImageMetadata, PixelFormat, RasterImage};
|
||||
|
@ -1183,7 +1184,7 @@ impl IOCompositor {
|
|||
// complete (i.e. has *all* layers painted to the requested epoch).
|
||||
// This gets sent to the constellation for comparison with the current
|
||||
// frame tree.
|
||||
let mut pipeline_epochs = HashMap::new();
|
||||
let mut pipeline_epochs = FnvHashMap::default();
|
||||
for id in self
|
||||
.webview_renderers
|
||||
.iter()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue