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

Place a ceiling for initial capacity allocated for bytes.Buffer #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abhinavdangeti
Copy link
Member

  • Initializing the ceiling to 10MB. This means that at least
    10 MB of space is guaranteed if the estimate is larger than
    that. Any additional space will be allocated on demand.
  • Intended to address: Looks like there is a memory leak bleve#1780

+ Initializing the ceiling to 10MB. This means that at least
  10 MB of space is guaranteed if the estimate is larger than
  that. Any additional space will be allocated on demand.
+ Intended to address: blevesearch/bleve#1780
@@ -32,6 +32,7 @@ import (
var NewSegmentBufferNumResultsBump int = 100
var NewSegmentBufferNumResultsFactor float64 = 1.0
var NewSegmentBufferAvgBytesPerDocFactor float64 = 1.0
var MaxSegmentBufferInitialSize int = 10 * 1024 * 1024 // 10MB
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking, does it make it sense it make this as a config option in bleve? If we have that, perhaps it would make things a bit more flexible and accommodative based on the use case of application, like the application can run some iterations with different values and set it as a config which works the best for their use case which need not be the optimal value for other use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants