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

Querying datastore currently very expensive #3270

Closed
whyrusleeping opened this issue Sep 28, 2016 · 4 comments
Closed

Querying datastore currently very expensive #3270

whyrusleeping opened this issue Sep 28, 2016 · 4 comments
Assignees
Labels
topic/perf Performance

Comments

@whyrusleeping
Copy link
Member

Right now, querying the datastore, whether through the blockstore, or separately as is the case for provider records. Some of this is because the query returns the keys as strings, which we then convert to datastore keys (which isnt a free operation), and then do some extra (probably unncessary) processing per key. We should work on improving this soon.

@whyrusleeping whyrusleeping added topic/perf Performance status/ready Ready to be worked labels Sep 28, 2016
@kevina
Copy link
Contributor

kevina commented Oct 4, 2016

I would be really interested in the overhead to convert from a binary key to the hex32 encoding and how much overhead in general the Datastore library causes as oppose to using the leveldb directly.

Related ipfs/go-datastore#40.

@kevina kevina added this to the Improve Performance milestone Oct 31, 2016
@kevina kevina self-assigned this Oct 31, 2016
@kevina
Copy link
Contributor

kevina commented Nov 14, 2016

I have done some work on this in #3376 although they only relate to querying through the blockstore, in the blockstore case the extra key processing does not have a significant impact on a multi-core machine. On a single core machine it might, and reducing the extra processing will likely help in CPU usage.

@kevina
Copy link
Contributor

kevina commented Dec 2, 2016

@whyrusleeping now that all of my performance improvements are in, do you think we can close this?

@whyrusleeping
Copy link
Member Author

I think this can probably be closed for now. Good job @kevina :)

@whyrusleeping whyrusleeping removed the status/ready Ready to be worked label Dec 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/perf Performance
Projects
None yet
Development

No branches or pull requests

3 participants
@whyrusleeping @kevina and others