Skip to content

Conversation

@mgautierfr
Copy link
Member

Adapt to new jbk api (jubako/jubako#74)

We now have a two steps entry store creation:

  • Update a tree
  • Convert it to a iterator and give it to Jubako

Previously, entry tree was adding the entry directly to the jbk EntryStore.
Now it is a tree steps creation:
- Create a entry tree.
- Flatten the entry tree into a vec
- Add entries from the vec to the jbk::EntryStore.

Notes:
- jbk EntryStore still handle the jbk idx for us, so we still need to use
  vow and such.
- The flatten process is not good but:
  . We cannot do better for now as we have Arc<Mutex<DirCache>> and it
    it prevents us to consume the entry.
  . We don't really care as jbk handle idx for us and will reorder the
    entries.
  . We will fix that really soon.
We don't do concurrent access on the tree, so we can remove the
`Arc<Mutex<..>>`.
We now use the same order than jubako : (ParentIdx, Name).

Previously we was ensuring that sibling entries was in a contiguous range
but nothing more.
This avoid the creation of a HashMap.
@mgautierfr mgautierfr merged commit 6ec778b into main Dec 17, 2025
23 checks passed
@mgautierfr mgautierfr deleted the new_jbk_api branch December 17, 2025 13:57
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

Successfully merging this pull request may close these issues.

2 participants