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

Question: why a pool for each template? #1

Closed
mathvav opened this issue May 25, 2016 · 1 comment
Closed

Question: why a pool for each template? #1

mathvav opened this issue May 25, 2016 · 1 comment
Labels

Comments

@mathvav
Copy link

mathvav commented May 25, 2016

Why do you use a worker pool for bytes.Buffers that are template-specific (vs. a global pool)? Is it for getting similar sized buffers each time, or is there another reason?

@mathvav mathvav changed the title Question: why a worker pool for each template? Question: why a pool for each template? May 25, 2016
@valyala
Copy link
Owner

valyala commented May 25, 2016

It is for getting similar sized buffers each time. This reduces memory waste if multiple templates with different sizes are in concurrent use.

@valyala valyala closed this as completed May 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants