hey folks, do we have thoughts about reusing RuleR...
# development
c
hey folks, do we have thoughts about reusing RuleRunners across testing files? I don't have a good idea about whether this is a good idea or not. It feels bad to have a lot of code in common for setting one up for multiple files (eg many of the rules and targets are the same, some of the files for the integration test cases are the same). We seem to always set up at least one RuleRunner per test file.
b
I think it's fine 🤷‍♂️ it's already reused across tests. The only thing I wonder is how much slower the test runs if we throw more rules at it, otherwise meh?
c
yeah, I wasn't sure if someone had done a performance tradeoff between many small runners vs one big runner.
b
I've been thinking of profiling the tests for a while
c
That would be nice. I noticed that each terraform integration test I ran adds like 3s, which isn't a lot but also isn't nothing.
b
I’ve noticed tests run much faster if they don’t use the Python targets/rules (e.g. https://github.com/pantsbuild/pants/pull/18814#issuecomment-1521048750 / https://github.com/pantsbuild/pants/pull/18814/commits/f514d0b8a41090e7f300c8601ac74210b02e26da), but that's still using a rule runner with those rules loaded, so it's not evidence against having multi-file runners that may have a few 'unnecessary' rules