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

Performance question #118

Closed
anri-asaturov opened this issue Dec 20, 2019 · 1 comment
Closed

Performance question #118

anri-asaturov opened this issue Dec 20, 2019 · 1 comment

Comments

@anri-asaturov
Copy link

Does it make sense to reuse Pbf instance for writing?
pbf.finish().slice() to get a copy of the result to avoid race condition and reset pos/length?

@mourner
Copy link
Member

mourner commented Dec 20, 2019

It probably makes sense, although the difference might not be significant. You can always benchmark for your use case though!

@mourner mourner closed this as completed Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants