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

perf(applyNaive): avoid walking the tree for each file in the same directory #11337

Merged
merged 1 commit into from
Mar 7, 2025

Conversation

azr
Copy link
Contributor

@azr azr commented Feb 4, 2025

This for example allowed us to gain ~5s while pulling/unpacking ghcr.io/huggingface/text-generation-inference:3.0.2

Has impact in directories with a lot of files.

@k8s-ci-robot
Copy link

Hi @azr. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@azr azr force-pushed the tar-rootpath-cache branch 2 times, most recently from d64685a to dbb7668 Compare February 4, 2025 16:48
@azr azr changed the title perf(createTarFile): avoid walking the tree for each file in the same directory perf(applyNaive): avoid walking the tree for each file in the same directory Feb 4, 2025
@azr azr force-pushed the tar-rootpath-cache branch 3 times, most recently from a23e6f4 to 2303376 Compare February 5, 2025 08:23
@kzys
Copy link
Member

kzys commented Feb 7, 2025

@samuelkarp Can you take a look just in case since fs.RootPath() is protecting containerd from malicious images.

That being said, I think this change is safe. cachedRootPath.Get returns what fs.RootPath returns.

@azr
Copy link
Contributor Author

azr commented Feb 28, 2025

Hello there ! Coming in this PR to see if there is anything I can do to make merging easier. Cheers !

@azr azr force-pushed the tar-rootpath-cache branch 2 times, most recently from e7dbd8b to 31eccab Compare February 28, 2025 17:39
Copy link
Member

@djdongjin djdongjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, one minor comment

@azr azr force-pushed the tar-rootpath-cache branch from 31eccab to ba7750d Compare February 28, 2025 17:47
…rectory

This for example allowed us to gain ~5s while pulling ghcr.io/huggingface/text-generation-inference:3.0.2

Signed-off-by: Adrien Delorme <[email protected]>
Co-Authored-By: Corentin REGAL <[email protected]>
@azr azr force-pushed the tar-rootpath-cache branch from ba7750d to d8063c3 Compare February 28, 2025 17:50
Copy link
Member

@djdongjin djdongjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@azr
Copy link
Contributor Author

azr commented Mar 5, 2025

Hello ! Sorry to ping here ! Is there something missing or that I could to better this one up? Cheers !

@estesp estesp added this pull request to the merge queue Mar 7, 2025
Merged via the queue into containerd:main with commit b1924f1 Mar 7, 2025
56 checks passed
@azr azr deleted the tar-rootpath-cache branch March 10, 2025 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants