Bug 1951357 - Use a SmallVec for Rust marker payloads to avoid unnecessary allocations for most markers r=mstange,profiler-reviewers,aabh,jrmuizel
We've seen in the past that bincode::serialize was spending too much time allocating and deallocating a Vec to return the serialized payload. Instead now, we are creating a SmallVec with 64 bytes inline storage, which is enough for most of our markers for today. This way, SmallVec will try to keep payloads inside the stack, and it will only allocate if it goes above 64 bytes. Differential Revision: https://phabricator.services.mozilla.com/D240150
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -2266,6 +2266,7 @@ dependencies = [
|
||||
"mozbuild",
|
||||
"profiler-macros",
|
||||
"serde",
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
Reference in New Issue
Block a user