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

reuse Write and ReadOptions #8

Closed
jmhodges opened this issue Nov 5, 2013 · 3 comments
Closed

reuse Write and ReadOptions #8

jmhodges opened this issue Nov 5, 2013 · 3 comments

Comments

@jmhodges
Copy link

jmhodges commented Nov 5, 2013

levigo.WriteOptions and levigo.ReadOptions are immutable config options that you can make once for each config that you need, and reuse. There's a few places in LevelDbDatastore that needlessly create them on every method call.

@pauldix pauldix closed this as completed in 37b2ab1 Nov 5, 2013
@jmhodges
Copy link
Author

jmhodges commented Nov 5, 2013

Oh man, in case someone comes along and sees my poor (cold induced) word choice: s/immutable/unmodified by leveldb/

Nice job getting this in so fast.

@pauldix
Copy link
Member

pauldix commented Nov 5, 2013

No problem, thanks for looking at our code and telling us how to make it
better! I assume it's safe to share those options across goroutines?

On Tue, Nov 5, 2013 at 4:21 PM, Jeff Hodges notifications@github.comwrote:

Oh man, in case someone comes along and sees my poor (cold induced) word
choice: s/immutable/unmodified by leveldb/

Nice job getting this in so fast.


Reply to this email directly or view it on GitHubhttps://github.com//issues/8#issuecomment-27813472
.

@jmhodges
Copy link
Author

jmhodges commented Nov 5, 2013

It is (unless you modify them yourself, of course)!

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