[2.x] perf: Cache compiler bridge binary#8377
Conversation
**Problem** Compiler bridge resolution calls out to Coursier, and it shows up on the profiler. **Solution** This uses sbt 2.x caching to cache the prebuilt compiler bridge binaries to avoid calling Coursier from second time onwards.
7aceeb3 to
68b2b7d
Compare
|
Hello, Because of this, I've been experiencing some flaky tests in the Scala plugin - sometimes the jar is in the project directory, and other times it's in the CAS store. I can try to handle this flakiness, but do you think it's okay that this behavior isn't consistent? |
|
In general how is the flakiness manifested? Do you have some code that's following the symlink? If we want this cached, I guess we can try to make symlink even for the first usage? |
|
In the This likely depends on the test order, but I'm not entirely sure. Either way, this behavior is also reproducible in any project, not just in tests.
If you think it's technically reasonable, then it should fix the problem. |
|
I've split this into a new issue - #8445 |
Ref #8360
Problem
Compiler bridge resolution calls out to Coursier, and it shows up on the profiler.
Solution
This uses sbt 2.x caching to cache the prebuilt compiler bridge binaries to avoid calling Coursier from second time onwards.
Test
Before
2±1s on sbt/sttp running
Test/compile.After
2±0s on sbt/sttp running
Test/compileafter two warmups.