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

Oxidize NoseyParker #654

Closed
2 tasks done
Byron opened this issue Dec 13, 2022 · 5 comments
Closed
2 tasks done

Oxidize NoseyParker #654

Byron opened this issue Dec 13, 2022 · 5 comments
Labels
C-integrate-gitoxide "Oxidize" crates even more by replacing git2 with gitoxide

Comments

@Byron
Copy link
Member

Byron commented Dec 13, 2022

Required Features

(among others that are already implemented)

  • a fast way to get the size and kind of an object by ID, by reading only headers, similar to read_header().
  • Something like NO_DOT_GIT option to prevent trying two directories if one is given. (open::Options::open_path_as_is() #667)
  • a filter to only traverse packed objects if they match a given filter to allow blob-only traversal. (for max performance)
  • Generalize git_odb::Store::verify_integrity() so that users can be called on each decoded object to perform their own computation. Not needed, possibly not actually faster.

The first integration PR in the repository and the follow-up.

@Byron Byron added the C-integrate-gitoxide "Oxidize" crates even more by replacing git2 with gitoxide label Dec 13, 2022
@bradlarsen
Copy link

a filter to only traverse packed objects if they match a given filter to allow blob-only traversal. (for max performance)

This functionality would be generally useful. But in the case of Nosey Parker, though it might speed things up a bit at present, it's a low priority wish list item.

In the longer term, Nosey Parker will also be looking at tree and commit objects to gather precise metadata about blobs with matches (pathnames and the set of commits that first introduced the matching content: praetorian-inc/noseyparker#16. To implement that, in addition to reading every blob, Nosey Parker will also have to read every commit and tree. So at that point, having a gitoxide object filter mechanism would be less useful.

@Byron
Copy link
Member Author

Byron commented Dec 21, 2022

Thanks for letting me know! I think it's best to remove it as a feature requirement alltogether, because even if you'd not be interested in, say, annotated tags, it would make no difference in performance to skip them after they have been decoded, rather than before.

The equivalent to NO_DOT_GIT will land in a moment by the way. Now opening repos is a bit faster as it actually does less IO in the typical case, for typically named repositories, so it's a super nice feature to have.

@Byron
Copy link
Member Author

Byron commented Dec 21, 2022

Awesome, I think everything is done as the last outstanding feature was just merged into main. By the time the new integration branch is ready for merge, I can cut a new release in case you'd like to use that feature and remove the workaround (it's in ca84c87).

@Byron
Copy link
Member Author

Byron commented Sep 4, 2023

I think this task is completed :).

@Byron Byron closed this as completed Sep 4, 2023
@bradlarsen
Copy link

bradlarsen commented Sep 4, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-integrate-gitoxide "Oxidize" crates even more by replacing git2 with gitoxide
Projects
None yet
Development

No branches or pull requests

2 participants