Skip to content

Commit 26acd7f

Browse files
authored
[FC] Stop cloning SnapshotKeySet (#11925)
We frequently read the snapshot keys, and cloning every time is expensive. Currently, every time we use this function is read-only and the clone is unnecessary. Only firecracker code and tests are referencing this
1 parent b36efab commit 26acd7f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • enterprise/server/remote_execution/containers/firecracker

enterprise/server/remote_execution/containers/firecracker/firecracker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ func alignToMultiple(n int64, multiple int64) int64 {
10261026
}
10271027

10281028
func (c *FirecrackerContainer) SnapshotKeySet() *fcpb.SnapshotKeySet {
1029-
return c.snapshotKeySet.CloneVT()
1029+
return c.snapshotKeySet
10301030
}
10311031

10321032
func (c *FirecrackerContainer) SnapshotID() string {

0 commit comments

Comments
 (0)