[darcs-users] optimization in HEAD: darcs diff
guillaumh at gmail.com
Mon May 21 19:59:56 UTC 2012
I'd like to share to the darcs-users list another significant change
in HEAD that happened after the release of Darcs 2.8, this time an
In 2010 Petr Rockai optimized the "darcs diff" command, but a few
things blocked the inclusion of this piece of code into darcs.
Notably, the optimization did not support old-fashioned repositories.
However, since version 2.8 Darcs no longer fully support these
repositories, so the new implementation of "diff" has been ported to
As in Petr's words (http://bugs.darcs.net/patch351):
I have changed the diff code to only write those files that actually changed in
the temporary locations. On my other project (less than 1000 working copy
(with cold cache)
head: darcs diff 1,09s user 0,58s system 9% cpu 16,752 total
now: darcs diff 0,14s user 0,04s system 6% cpu 2,978 total
(with hot cache)
head: darcs diff 0,36s user 0,18s system 98% cpu 0,548 total
now: darcs diff 0,06s user 0,01s system 86% cpu 0,078 total
I've added more informal benchmarks at the end of this mail.
So, if you want to build a darcs from HEAD and discover again "darcs
diff", have a go at it and see how fast it has become!
If you are using an external diffing tool, you can use the new flag
--no-pause-for-gui (http://bugs.darcs.net/patch748) implemented by
Following the switch to this new implementation, Owen Stephens noticed
that diffing directories no longer worked
(http://bugs.darcs.net/issue2179) but Yuriy Vostrikov soon sent a
patch fixing this issue (http://bugs.darcs.net/patch818).
If you find more bugs, please let us know!
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Informal benchmarks on http://darcs.net/ between darcs 2.8 and current HEAD.
("time darcs diff" is run until the time ouput becomes consistent, ie,
benchmarks are done on hot disk cache).
Last patch in HEAD ("kill footnotes"):
With a patch deeper in the history ("update NEWS log with 2.5.1")
Even older (patch "Import bracketOnError from Workaound" from 2006):
More information about the darcs-users