
I have a larg-ish project (800 modules) and these ghc compilation times: cabal install : 19 min cabal install --disable-doc : 13 min the compilation includes the profiling build. That is, running haddock takes the same 6 minutes as running the compiler (with optimization) I also built with "optimization: False library-profiling: False" and this takes 3 min. I understand that haddockification goes via the compiler's front-end to resolve names and infer types. This takes 3 min (as the non-optimizing compiler run shows). What does haddock do in the other 3 min? What could I do to help analyze this? - J.W. (ghc-7.8.3, haddock 2.15.0, rotating disk (not SSD), Fedora 20, x86_64)

On 11/06/2014 02:40 PM, Johannes Waldmann wrote:
I have a larg-ish project (800 modules) and these ghc compilation times:
cabal install : 19 min cabal install --disable-doc : 13 min
the compilation includes the profiling build.
That is, running haddock takes the same 6 minutes as running the compiler (with optimization)
I also built with "optimization: False library-profiling: False" and this takes 3 min.
I understand that haddockification goes via the compiler's front-end to resolve names and infer types. This takes 3 min (as the non-optimizing compiler run shows).
How do you measure this?
What does haddock do in the other 3 min?
What could I do to help analyze this?
Probably running profiled Haddock executable is the best way to get more insight. Also check your RAM usage because it can get very high as per https://github.com/haskell/haddock/issues/295 . I'll very happily take performance-improving patches. If you can provide some kind of meaningful performance data then that's useful too.
- J.W.
(ghc-7.8.3, haddock 2.15.0, rotating disk (not SSD), Fedora 20, x86_64)
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Mateusz K.

On 11/07/2014 02:56 PM, Mateusz Kowalczyk wrote:
On 11/06/2014 02:40 PM, Johannes Waldmann wrote:
I have a larg-ish project (800 modules) and these ghc compilation times:
cabal install : 19 min cabal install --disable-doc : 13 min
the compilation includes the profiling build.
That is, running haddock takes the same 6 minutes as running the compiler (with optimization)
I also built with "optimization: False library-profiling: False" and this takes 3 min.
I understand that haddockification goes via the compiler's front-end to resolve names and infer types. This takes 3 min (as the non-optimizing compiler run shows).
How do you measure this?
Sorry, missed a section, I see now. I think it's bed time for me ;).
What does haddock do in the other 3 min?
What could I do to help analyze this?
Probably running profiled Haddock executable is the best way to get more insight. Also check your RAM usage because it can get very high as per https://github.com/haskell/haddock/issues/295 .
I'll very happily take performance-improving patches. If you can provide some kind of meaningful performance data then that's useful too.
- J.W.
(ghc-7.8.3, haddock 2.15.0, rotating disk (not SSD), Fedora 20, x86_64)
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Mateusz K.

... running profiled Haddock executable ...
how exactly do I do this? I can build haddock like this: cabal install --enable-executable-profiling haddock and then, in my project, cabal haddock --haddock-options='+RTS -p -h -RTS' results in this error: haddock: dist/build/tmp-22236/src/Inter/Wert.hs:1:14-28: You can't use Template Haskell with a profiled compiler - J.W.

On 11/07/2014 05:44 PM, Johannes Waldmann wrote:
... running profiled Haddock executable ...
how exactly do I do this? I can build haddock like this:
cabal install --enable-executable-profiling haddock
and then, in my project,
cabal haddock --haddock-options='+RTS -p -h -RTS'
results in this error:
haddock: dist/build/tmp-22236/src/Inter/Wert.hs:1:14-28: You can't use Template Haskell with a profiled compiler
- J.W.
Ah, unfortunately it is what it says, you can't use TH in this scenario. There is a workaround at https://www.haskell.org/ghc/docs/7.8.3/html/users_guide/template-haskell.htm..., section 7.16.4, maybe it will work for you. If it's possible to temporarily disable the TH in question (stick undefined in place) then that might be easier although I don't expect that's easily achievable, I think you mentioned ~800 modules. -- Mateusz K.
participants (2)
-
Johannes Waldmann
-
Mateusz Kowalczyk