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

Add dedicated Index class for unique, non-sparse String fields #1

Open
4 of 6 tasks
justlep opened this issue Apr 26, 2022 · 0 comments
Open
4 of 6 tasks

Add dedicated Index class for unique, non-sparse String fields #1

justlep opened this issue Apr 26, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@justlep
Copy link
Owner

justlep commented Apr 26, 2022

The Index class internally uses AVLTree even for unique, non-sparse indexed fields like _id.
Index performance could (most likely) be improved by using a native Map instead of AVLTree for such fields.

TODO

  • add a UniqueStringIndex class extending or implementing the existing Index class
  • override all relevant methods to use a native Map internally
  • make UniqueStringIndex.getBetweenBounds() throw (irrelevant usecase)
  • make Datastore use UniqueStringIndex for the _id field by default
  • find a way to enable a developer to use UniqueStringIndex for other string indexes as well
  • compare benchmarks before/after
@justlep justlep added the enhancement New feature or request label Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant