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

Cache output of assembly #1125

Merged
merged 1 commit into from
Feb 17, 2024
Merged

Cache output of assembly #1125

merged 1 commit into from
Feb 17, 2024

Conversation

Duhemm
Copy link
Contributor

@Duhemm Duhemm commented Feb 14, 2024

Previously, the build would rebuild over and over the uber jar with the
shaded protobuf3 distribution. With this patch, this is no longer the
case, as the output is cached locally.


The issue with assembly re-creating the same uber-jar on (nearly) every run was discovered using the Develocity Timeline feature, which displays task executions on different swimlanes.

Before this fix, the assembly task is clearly shown as being a bottleneck in the build process:
Screenshot 2024-02-02 at 16 19 38

After this patch is applied, the bottleneck is gone:
Screenshot 2024-02-02 at 16 19 51

After the bottleneck is gone, common tasks (eg. test) start faster: Gathering all tests’ names goes from 3.7s to 3.2s (-15%).

Previously, the build would rebuild over and over the uber jar with the
shaded protobuf3 distribution. With this patch, this is no longer the
case, as the output is cached locally.
@pjfanning
Copy link
Contributor

relates to #1008

Copy link
Member

@Roiocam Roiocam left a comment

Choose a reason for hiding this comment

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

Looks great, Thanks.

project/Protobuf.scala Show resolved Hide resolved
@mdedetrich
Copy link
Contributor

Thanks for the PR, @Roiocam fyi this is precisely what I was talking about earlier wrt sbt's inbuilt caching functionality

Copy link
Contributor

@mdedetrich mdedetrich left a comment

Choose a reason for hiding this comment

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

lgtm but lets get approval from @Roiocam before merging to double check nothing is amiss.

Copy link
Member

@Roiocam Roiocam left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks.

project/Protobuf.scala Show resolved Hide resolved
@mdedetrich
Copy link
Contributor

Thanks for the PR then, merging!

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.

4 participants