
On 22.02.2016 22:27, Johannes Waldmann wrote:
I presume you are using the -j switch. Does it really help? I recently found that for travis builds, it is used by default (first surprise) but it's faster when it's turned off (second surprise).
I meant ghc -j, not cabal -j. It does work very well. I did the following test. wojtek@Desktop2016:~/src/tpdb-1.2.0/src$ time ghc -j -fforce-recomp TPDB/*.hs TPDB/XTC/*.hs TPDB/DP/*.hs TPDB/CPF/Proof/*.hs TPDB/Data/*.hs TPDB/Plain/*.hs TPDB/Xml/*.hs [24 of 24] Compiling TPDB.Mirror ( TPDB/Mirror.hs, TPDB/Mirror.o ) real 0m1.221s user 0m2.416s sys 0m0.604s wojtek@Desktop2016:~/src/tpdb-1.2.0/src$ time ghc -fforce-recomp TPDB/*.hs TPDB/XTC/*.hs TPDB/DP/*.hs TPDB/CPF/Proof/*.hs TPDB/Data/*.hs TPDB/Plain/*.hs TPDB/Xml/*.hs [24 of 24] Compiling TPDB.Mirror ( TPDB/Mirror.hs, TPDB/Mirror.o ) real 0m1.791s user 0m1.660s sys 0m0.060s wojtek@Desktop2016:~/src/tpdb-1.2.0$ time cabal build -j [24 of 24] Compiling TPDB.CPF.Proof.Util ( src/TPDB/CPF/Proof/Util.hs, dist/build/TPDB/CPF/Proof/Util.o ) real 0m5.544s user 0m10.912s sys 0m2.628s Something is indeed wrong, either cabal is misusing ghc, or you are misusing cabal. This package is not a good test case for parallel build, it is too small. -- Wojtek