Skip to content

Instantly share code, notes, and snippets.

@kowey
Created December 16, 2010 16:18
Show Gist options
  • Select an option

  • Save kowey/743585 to your computer and use it in GitHub Desktop.

Select an option

Save kowey/743585 to your computer and use it in GitHub Desktop.
Sun Jun 13 01:02:34 BST 2004 jch@pps.jussieu.fr
* Avoid unpacking PackedStrings in the printer.
Darcs reads file data into PackedStrings, but unpacks them when
printing out a patch.
The fix is to make the printer able to grok streams of arbitrary
tokens, not just Haskell strings (streams of Char). See the type
class Printer.Printable and the instance Printer.PChar. See also the
type synonim PrintPatch.PrinterType, which is what gets actually used.
The net effect is that darcs whatsnew is more than twice as fast, and
darcs pull of large patches uses 10 (!) times less memory. On the
other hand, darcs pull of many small patches uses up a few percent
more CPU time, which I don't understand.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment