haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 211 forks source link

CircleCI build time varies from 7 to 40 minutes for the same commit #1243

Open nponeccop opened 5 years ago

nponeccop commented 5 years ago

Somehow there is big difference in build duration between different ghc versions. So we need to double-check it's not a cache system malfunction or something.

alanz commented 5 years ago

I think the machines the tests run on are multi-tenant, so it also depends on the load of whatever else is running, that we cannot know.

nponeccop commented 5 years ago

In the build I'm looking at the difference is not caused by noisy neighbors:

So far apparently the differences are caused by different number of commits in each build (the fast has 2 and the slow 17), which is normal.

Another issue is long cache rebuilds (20 minutes out of 45 is cache compression). So we may try to make caches more granular.

lukel97 commented 5 years ago

For https://circleci.com/gh/haskell/haskell-ide-engine/7213 it looks like the most specific cache was invalidated, so it fell back to one of the more generic caches. The most specific cache IIRC is invalidated whenever any .cabal or the stack.yaml file changes. Ironically, the caching itself is the slowest part it seems, but hopefully after that the 8.4.3 job shouldn't need to create another cache and it should be more within the 20 minute range.