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 API method to compact the version map #292

Open
2 tasks
mehertz opened this issue Apr 28, 2023 · 0 comments
Open
2 tasks

Add API method to compact the version map #292

mehertz opened this issue Apr 28, 2023 · 0 comments

Comments

@mehertz
Copy link
Collaborator

mehertz commented Apr 28, 2023

The version map is modelled as a linked list of versions. For symbols with a large number of versions, retrieving old versions means traversing the list which can be IO intensive (e.g. see #198)

To resolve this, we can compact multiple version keys into a single key. There is a method to do this:

lib._nvs.version_store._compact_version_map(<SYMBOL NAME>)

We would like to:

  • Make this method public. It is private, which implies we may change it.

We might consider:

  • Invoke the public method when calling any modifying operator (update, append, write and their batch equivalents). This should be controlled via a keyword argument.
@poodlewars poodlewars changed the title Compact the version_map inline when any modifying operator is invoked Add API method to compact the version map Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants