I'm working on a larger project that takes about two minutes to compile on our build server. I'm searching for ways to optimize compile times. Do you use caches for class files between builds, and if so, how do you manage to keep them from becoming stale? Has anyone looked into profiling the compiler to see where the most time is being spent?
1 Answer
Honestly, is 2 minutes that much of a problem? I mean, how fast does it really need to be? What issues does this extra time cause you? If it’s a big concern, maybe try looking into Bazel for better performance.

The whole build pipeline really needs to be under 10 minutes, and that includes a lot like frontend builds and various tests. We've optimized a lot, but Java compilation is still a significant step that slows things down.