Skip to content

Conversation

@cowwoc
Copy link

@cowwoc cowwoc commented Apr 26, 2025

…ckaging of unused files

Following up on #5924, I noticed that exporting files from the protobuf stage is extremely slow and of the 5800+ files, only 5 are actually needed to build language bindings. This reduces the build time by 2 minutes on my end.

@jsternberg As far as I can tell, the googleapis stage contains the majority of the unused files and it isn't actually used by anyone. Can you please confirm this is the case?

@github-actions github-actions bot added the area/hack building buildkit itself label Apr 26, 2025
…ckaging of unused files

Signed-off-by: Gili Tzabari <cowwoc2020@gmail.com>
@cowwoc cowwoc force-pushed the trim-generated-files branch from 84075fd to 69a2929 Compare April 26, 2025 20:32
@tonistiigi tonistiigi requested a review from jsternberg April 28, 2025 22:24
Copy link
Collaborator

@jsternberg jsternberg left a comment

Choose a reason for hiding this comment

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

Sorry for taking so long to respond to this.

The google apis are used by some of the protobuf files. In particular, I think it gets the status proto from there and maybe one other thing. I don't know the specifics off the top of my head, but they are used and necessary.

It also might be ok to filter vtproto, but I don't think this ends up improving the performance of the resulting dockerfile from within our own dockerfile because these files are generally either cached or the files stay inside of buildkit. The performance improvement seems to be when you want to copy the files to the filesystem.

I might try to revisit this. If you're still interested in this kind of change, can you create an issue and ping me on it? I think that might be easier than doing a back and forth on a pull request as I want to respect your time and effort and I don't think I can do that through pull request reviews in good conscience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/hack building buildkit itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants