The ./protobufs/build.rs script has a defect that forces this crate, the hedera crate, and all downstream dependent crates to rebuild when they otherwise could perform an incremental build or not need a build at all.
While this only causes about one second of wasted time for the hedera crate by itself, this problem has a high negative impact on larger crates that transitively depend on the hedera-proto crate through the hedera crate.
Fixing this drops compile times for changes to a dependent app by over 50% and for changes to tests 60-80%.
Related issue(s):
n/a
Notes for reviewer:
How to test:
cargo clean
cargo build - observe successful compile
cargo build - observe that the outcome is again successful, but takes less than 100 milliseconds
Modify a file in ./protobufs/services
cargo build - observe compile takes more than 100ms and reflects the change
Negative outcomes:
Step 3 takes more than 1/4 of a second
OR
Compile is not successful
Description:
The
./protobufs/build.rs
script has a defect that forces this crate, the hedera crate, and all downstream dependent crates to rebuild when they otherwise could perform an incremental build or not need a build at all.While this only causes about one second of wasted time for the
hedera
crate by itself, this problem has a high negative impact on larger crates that transitively depend on thehedera-proto
crate through thehedera
crate.Fixing this drops compile times for changes to a dependent app by over 50% and for changes to tests 60-80%.
Related issue(s):
n/a
Notes for reviewer:
How to test:
cargo clean
cargo build
- observe successful compilecargo build
- observe that the outcome is again successful, but takes less than 100 milliseconds./protobufs/services
cargo build
- observe compile takes more than 100ms and reflects the changeNegative outcomes:
Step 3 takes more than 1/4 of a second OR Compile is not successful
Checklist