[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
main
Haobo Xu 11 years ago
parent abaf26266d
commit e94eea4527
  1. 1
      db/write_batch.cc

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

Loading…
Cancel
Save