haskell / haddock

Haskell Documentation Tool
www.haskell.org/haddock/
BSD 2-Clause "Simplified" License
361 stars 242 forks source link

Scrap SYB traversals, add GHC progress reporting during load #1600

Closed FinleyMcIlwaine closed 1 year ago

FinleyMcIlwaine commented 1 year ago

The SYB traversals were a huge contributor to memory usage for Haddock. This MR includes the work done by @wz1000 here to get rid of them. This brings maximum residency down about 10% in the testing I've done.

Also, with the current implementation of hi-haddock, the load operation can create an awkward silence if recompilation occurs as no progress reporting is being done by GHC. This MR changes the load' call to use the default batchMsg progress reporting and changes the default GHC verbosity level to 1 so that it is obvious when recompilation is occurring.