mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
storage: set revBytes capacity to avoid malloc when appending mark
This is a performance optimization.
This commit is contained in:
@@ -37,7 +37,7 @@ func (a revision) GreaterThan(b revision) bool {
|
||||
}
|
||||
|
||||
func newRevBytes() []byte {
|
||||
return make([]byte, revBytesLen)
|
||||
return make([]byte, revBytesLen, markedRevBytesLen)
|
||||
}
|
||||
|
||||
func revToBytes(rev revision, bytes []byte) {
|
||||
|
||||
Reference in New Issue
Block a user