rez
rez copied to clipboard
Replace the version API with Rust
Increase solver speed by porting the version submodule to Rust.
src/rez/vendor/version/
Conditions:
Rust implementation must benchmark faster than equivalent Python resolve in most cases Python implementation must remain available. Rust is optional. Rust implementation should be written to allow easy porting/addition of other portions of rez in Rust. Build process and code should be documented, targeting those who are unfamiliar with Rust Rust code must contain passing unittests Rust code must pass the existing Python test suite. Rust code must have the rez license at the top of each file
Just a note on this - if at all possible it'd be good to keep some form of --no-rust rez install option available (and great if this could translate to an extra for the rez pip package). Rez is very backwards compatible by design and I'd hate to introduce a new requirement that studios may not be ready to meet.
In the same vein, we should keep both the py- and rust- based version submods present - perhaps making rust available via import of rversion rather than version, and choosing between them in rez based on availability. We'd also then run the same unit test over rversion as we do version already.
I'm noting this stuff now (even though we're so early in) so we're thinking about it earlier on and hopefully avoiding more work later.
Also want to make you aware of the benchmarking CI we already have. We'll probably have to tweak it to show rust numbers alongside py or something.
https://github.com/nerdvegas/rez/blob/master/metrics/benchmarking/RESULTS.md
Hi @scott-wilson,
To @nerdvegas's point, it would be great to describe what this PR does and why. There is no description at the moment which is mildly surprising.
Cheers,
Thomas
Hi @scott-wilson,
To @nerdvegas's point, it would be great to describe what this PR does and why. There is no description at the moment which is mildly surprising.
Cheers,
Thomas
That's fair. I am mostly just getting something done before I turn this into a proper PR.
Hi @scott-wilson,
To @nerdvegas's point, it would be great to describe what this PR does and why. There is no description at the moment which is mildly surprising.
Cheers,
Thomas
Here's an initial take at the PR description.
Increase solver speed by porting the version submodule to Rust.
src/rez/vendor/version/
Conditions:
- Rust implementation must benchmark faster than equivalent Python resolve in most cases
- Python implementation must remain available. Rust is optional.
- Rust implementation should be written to allow easy porting/addition of other portions of rez in Rust.
- Build process and code should be documented, targeting those who are unfamiliar with Rust
- Rust code must contain passing unittests
- Rust code must pass the existing Python test suite.
- Rust code must have the rez license at the top of each file
Kudos, SonarCloud Quality Gate passed! 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
Kudos, SonarCloud Quality Gate passed! 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
I know this is a bit old now but I'm wondering what kind of performance increase was coming out of this? As our Rez repos are increasing in size resolves are getting slower and slower so I'm curious about anything that could speed it up at this point.
I know this is a bit old now but I'm wondering what kind of performance increase was coming out of this? As our Rez repos are increasing in size resolves are getting slower and slower so I'm curious about anything that could speed it up at this point.
Are you running memcached? We hardly see any performance issue with the solver with memcached.
I know this is a bit old now but I'm wondering what kind of performance increase was coming out of this? As our Rez repos are increasing in size resolves are getting slower and slower so I'm curious about anything that could speed it up at this point.
Are you running memcached? We hardly see any performance issue with the solver with memcached.
That's likely derailing the thread a little bit, but no, right now cache was disabled because we had issues with the resolve not always grabbing the latest versions if it has old stuff cached already. If you or someone else has time for a chat I'd love to go through our setup to see if there are things we could do to speed it up.
You may want to jump onto the Slack if you can, that will give perspective and support by multiple parties