use sync.Pool to optimize db.Put operation
roseduan opened this issue · 1 comments
roseduan commented
Now the db.Put operation will create a new batch every time, which may cause too much memory allocation.
We can use sync.Pool to avoid this.
The goleveldb has done this, see https://github.com/syndtr/goleveldb/blob/master/leveldb/db_write.go#L362
tobehardest commented
I will do this.