[RocksDB] [Performance Branch] Minor fix, Remove string resize from WriteBatch::Clear

Summary: tmp_batch_ will get re-allocated for every merged write batch because of the existing resize in WriteBatch::Clear. Note that in DBImpl::BuildBatchGroup, we have a hard coded upper limit of batch size 1<<20 = 1MB already.

Test Plan: make check

Reviewers: dhruba, sdong

CC: leveldb

Differential Revision: https://reviews.facebook.net/D14787
This commit is contained in:
Haobo Xu 2013-12-20 14:18:28 -08:00
parent abaf26266d
commit e94eea4527

View File

@ -58,7 +58,6 @@ bool WriteBatch::Handler::Continue() {
void WriteBatch::Clear() {
rep_.clear();
rep_.resize(kHeader);
}
int WriteBatch::Count() const {