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

Increased build time using cargo-near-build after #289 PR #302

Closed
frolvanya opened this issue Jan 31, 2025 · 2 comments
Closed

Increased build time using cargo-near-build after #289 PR #302

frolvanya opened this issue Jan 31, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@frolvanya
Copy link

frolvanya commented Jan 31, 2025

Is it possible that this #289 PR increased building time? It runs slower on cargo-near-build v0.4.3 than on v0.4.3 + patching to the #292 PR

I have two workflow runs. The faster one was executed with

[patch.crates-io]
cargo-near-build = { git = "https://github.com/near/cargo-near", rev = "2851dc60945bb9da25b38bd46b3ba7b445db33d6" }

https://github.com/Near-One/omni-bridge/actions/runs/13063259194/job/36450815503
https://github.com/Near-One/omni-bridge/actions/runs/13063409784/job/36451266656

@frolvanya frolvanya added the bug Something isn't working label Jan 31, 2025
@frolvanya
Copy link
Author

frolvanya commented Jan 31, 2025

Additional context, I tried experimenting with patching and sscache:

rust-cache + cargo-near-build v0.4.3 without patching
cold – total duration 24mins, test duration 912s
warm – total duration 17mins, test duration 919s
Conclustion, while compilation time went down, test duration remains the same

sscache + cargo-near-build v0.4.3 without patching
cold – total duration 16mins, test duration 725s
warm – N/A

sscache + cargo-near-build v0.4.3 with patching
cold/warm (? I'm not sure, it says that cache was extracted, but all packages were recompiled) – total duration 10mins, test duration 478s

I was using this for patching for these tests:

[patch.crates-io]
cargo-near-build = { git = "https://github.com/dj8yfo/cargo-near", rev = "0fdf154175b6f62d6a3fee460dd43658aab68d53" }

@frolvanya frolvanya changed the title Increased build time Increased build time using cargo-near-build after #289 Jan 31, 2025
@frolvanya frolvanya changed the title Increased build time using cargo-near-build after #289 Increased build time using cargo-near-build after #289 PR Jan 31, 2025
@dj8yfo
Copy link
Collaborator

dj8yfo commented Jan 31, 2025

@frolvanya nope, not likely #289 introduced any additional time. It just unsets an env variable for a subprocess, the change should be on the scale of microseconds max.

I wouldn't rely on measuring time with gh actions executors performance. It differs from time to time even for identical code. It's like measuring length with rubber tape.
A set of a few runs on some local env without the unknowns of sscache would be more informative, at least with regard to measuring a difference of some patch introduced.

The annoying time addition is of wasm-opt-rs compiling.
I'll close this issue for now. Please reopen if you have an idea of what can be done to remedy this.

@dj8yfo dj8yfo closed this as completed Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants