Browse Source

storage: set revBytes capacity to avoid malloc when appending mark

This is a performance optimization.
Yicheng Qin 10 years ago
parent
commit
1214f77519
1 changed files with 1 additions and 1 deletions
  1. 1 1
      storage/revision.go

+ 1 - 1
storage/revision.go

@@ -37,7 +37,7 @@ func (a revision) GreaterThan(b revision) bool {
 }
 }
 
 
 func newRevBytes() []byte {
 func newRevBytes() []byte {
-	return make([]byte, revBytesLen)
+	return make([]byte, revBytesLen, markedRevBytesLen)
 }
 }
 
 
 func revToBytes(rev revision, bytes []byte) {
 func revToBytes(rev revision, bytes []byte) {