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

[RFC] Enable usage of rust-sccache for cargo builds #41617

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

icp1994
Copy link
Contributor

@icp1994 icp1994 commented Jan 13, 2023

Reviving #30702 - I tested the changes in this PR: YES

I have been using this for almost a week and it has reduced build times for rust packages quite considerably in my laptop. I have addressed some of the questions/suggestions from the reviews of the previous PR.

Although not the most scientific benchmark, I noted the build times from the cargo output while packaging 4 templates across iterations. In the first two iterations, all of them ran without sccache with an older version of the template to get a baseline without the interference of the crates being downloaded. Third iteration was with same old versions but with sccache enabled which created the cache of all 4 packages combined. Finally, last iteration with the full cache and the latest version of the templates - a typical scenario while updating a package. The difference between the second and the fourth iterations are as follows:

rust-analyzer | 6m 13s | 4m 49s
gping         | 1m 44s | 40.81s
difftastic    | 1m 32s | 34.80s
streampager   | 1m 14s | 23.25s

I will add docs for README later if there is consensus to merge this eventually.

x86_64*|i686*|arm*|aarch64*) hostmakedepends+=" rust-sccache" ;;
*) ;;
esac
fi
Copy link
Member

Choose a reason for hiding this comment

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

I really don't like implicit build-style dependencies, especially with logic like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree it's not the cleanest. But isn't it explicit since XBPS_SCCACHE is opt-in?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With ppc support being dropped from void, don't need the arch checking logic - so this is as "clean" as it's going to be.

@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions github-actions bot added the Stale label Jul 23, 2023
@github-actions github-actions bot removed the Stale label Jul 26, 2023
@classabbyamp classabbyamp added the xbps-src xbps-src related label Aug 9, 2023
Copy link

github-actions bot commented Nov 8, 2023

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions github-actions bot added the Stale label Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
xbps-src xbps-src related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants