foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
7.86k stars 1.56k forks source link

perf: borrow output when building test runner #8294

Closed DaniPopes closed 1 day ago

DaniPopes commented 2 days ago

We were taking in output by value which forced some clones in certain places for essentially no reason.

Cloning project output is incredibly slow due to the size and amount of nesting (especially with AST output). This should speed up tests in CI a decent amount.

Some random test

Of course this only affects the main thread, while we still have to deserialize all the artifacts every single test because the lazy static does nothing across processes