-
Notifications
You must be signed in to change notification settings - Fork 235
Refactor WriterT-style logging
#1543
Refactor WriterT-style logging
#1543
Conversation
|
Nice improvement! Though I think the new dependencies will be a problem for GHCs build system as they are not boot libraries and as such GHC can’t bootstrap them. Is it possible to use the bytestring builder and inline the dlist stuff and use the CPS writer from mtl? |
|
Ah, that's unfortunate! Is there a way to statically ensure that only boot packages are allowed? I can use the |
|
Ah, can't have a newer |
|
Noticed that this PR also did a |
| ( ordNub | ||
| . map fst | ||
| . filter ((== Visible) . piVisibility . snd) | ||
| $ packages) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This nub call in particular is troubling - packages is probably a very large list in some cases.
alexbiehl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice let’s go!
Based on #1541
This PR refactors the
WriterTlogging to use theCPSversion. TheMonadWriterinterface is scrapped in favor of a custom class for reporting errors.ErrMsgis nowBuilderinstead ofString.Overall this is a pretty decent improvement in performance. Testing this on the
persistentrepository andpersistent-testin particular (since that package has a ton of exports and not a lot of docs). You have to remember to do the step twice, because it'll buildpersistenttoo on the first time due to configuration changing.plain
With
cabal haddock persistent-test --haddock-options "+RTS -s -RTS":This branch
cabal haddock persistent-test --with-haddock=/home/matt/.cabal/bin/haddock --haddock-options "+RTS -s -RTS"This change alone results in a pretty nice performance improvement.
8 seconds faster to build docs for
persistent-test, down to 18 seconds from 26 seconds - 30% improvement.Total memory use is ~4% better (not huge, but not nothing).
Allocations are way down (42GB to 25GB).