Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use sync.Pool to optimize db.Put operation #79

Closed
Tracked by #103
roseduan opened this issue Jul 28, 2023 · 1 comment
Closed
Tracked by #103

use sync.Pool to optimize db.Put operation #79

roseduan opened this issue Jul 28, 2023 · 1 comment
Labels
enhancement New feature or request
Projects

Comments

@roseduan
Copy link
Contributor

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

@roseduan roseduan added the enhancement New feature or request label Jul 28, 2023
@roseduan roseduan added this to TODO in LotusDB Dev via automation Jul 28, 2023
@tobehardest
Copy link
Contributor

I will do this.

@roseduan roseduan mentioned this issue Aug 18, 2023
5 tasks
LotusDB Dev automation moved this from TODO to Done Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

3 participants