Closed miltkall closed 5 months ago
Hey there!
On these lines your create some DB indexes.
Do you actually use them somewhere (you only use AscendKeys in order to access the DB)?
Not yet. I planned to do so initially, but all queries turned out differently than anticipated. The indexes should probably be updated to work with the existing queries - or the querying should be refactored in general, since ...
Moreover you use AscendKeys here and here, when you only expect one result. Could this get implemented with a tx.Get method?
... it's not ideal. :-) You're totally right here, lots of room for improvement!
Let me know if you need further info!
Thanks for your fast response.
"the querying should be refactored in general" I could implement it, if you have concrete suggestions.
"You're totally right here, lots of room for improvement!" Should I make a pull request using the tx.Get method?
I could implement it, if you have concrete suggestions.
Tbh I don't, mainly because I haven't checked the recent versions of buntdb to see if/what's new, especially in regard of querying. In general I'd look for ways to optimize querying of large datasets, which goes back to indexes and maybe segmentation of data.
Should I make a pull request using the tx.Get method?
Sure! đđŒ
For example here you sort the slice after you extract the data from the DB. The DB could do that for us if we restructure the data.
Should I give it a try?
@miltkall thanks for checking back, yes, sure, feel free! :-)
Hello there, I have beeen reading/understanding your code in order to implement some new features. On these lines your create some DB indexes.
Do you actually use them somewhere (you only use AscendKeys in order to access the DB)?
Moreover you use AscendKeys here and here, when you only expect one result. Could this get implemented with a tx.Get method?
Of course the software works, I am just doing constructive criticms and trying to create a new feature đ so not a true issue...
Many thanks!