Skip to content

Faster shared parts #3803

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

Open
davidmorgan opened this issue Jan 30, 2025 · 5 comments
Open

Faster shared parts #3803

davidmorgan opened this issue Jan 30, 2025 · 5 comments
Assignees

Comments

@davidmorgan
Copy link
Contributor

davidmorgan commented Jan 30, 2025

Using shared parts (edit: the the source_gen feature) currently slows large builds by about a factor of x2; see the benchmark added for #3800 for the data.

@bwilkerson
Copy link
Member

By "shared parts" do you mean a part file that two libraries both include?

If so, is there a requirement for supporting this? The enhanced parts feature removes the ability to share parts in this way, so it's important to know if that isn't going to work. And if not, then we might want to let users know that moving off this pattern sooner will make builds faster, but not actually spend the time to improve performance.

@davidmorgan
Copy link
Contributor Author

By "shared parts" do you mean a part file that two libraries both include?

Sorry, I should have been clearer, I meant the source_gen feature which combines the output of multiple generators. So nothing to do with language/tooling, very much a build_runner thing :)

@tylandercasper
Copy link

loosely linked to #language-4241
automatic "part " inclusions would make it a lot easier for every generator to have it's own part file

@bwilkerson
Copy link
Member

Even without automatic part inclusions, enhanced parts would make it possible for each generator to generate a separate part file and then have build_runner generate a single part file that includes all of the generated parts. Users would only be required to add a single part directive for the top-level generated part.

@jakemac53
Copy link
Contributor

Good point about enhanced parts, that would be a nice way to do this in the future

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

4 participants