[darcs-users] [patch351] Optimize darcs diff.
Petr Ročkai
bugs at darcs.net
Wed Aug 18 21:00:47 UTC 2010
New submission from Petr RoÄkai <me at mornfall.net>:
Hi,
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
files):
(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
Yours,
Petr.
PS: Presumably, it would be yet more efficient to not write anything out and
not call an external diff tool in cases that can be avoided. I might release a
cabal library for formatting diffs, so if we know how to handle the options and
no explicit --diff-command is given, we could just do the diffing internally. I
guess the win is not going to be as big as from this change, though.
PPS: The bundle depends on the path refactor one, since I became too frustrated
with converting the paths half dozen times to satisfy the typechecker (I gave
up facing a FilePath -> SubPath conversion, which would probably require
another couple lines of path conversion code...)
8 patches for repository http://darcs.net/:
Wed Aug 11 17:39:29 CEST 2010 Petr Rockai <me at mornfall.net>
* First stab at a hashed-storage 0.6 port.
Thu Aug 12 00:09:46 CEST 2010 Petr Rockai <me at mornfall.net>
* Make SubPath just another alias for Relative.
Wed Aug 11 21:45:04 CEST 2010 Petr Rockai <me at mornfall.net>
* Make FileName an alias to Relative (from Hashed.Storage.Path).
Thu Aug 12 00:02:43 CEST 2010 Petr Rockai <me at mornfall.net>
* Replace FilePath with FileName in SelectChanges and ChooseTouching.
Thu Aug 12 00:16:21 CEST 2010 Petr Rockai <me at mornfall.net>
* Introduce a new Darcs.Path module to centralise path handling.
Thu Aug 12 00:36:15 CEST 2010 Petr Rockai <me at mornfall.net>
* Merge Darcs.Patch.FileName into Darcs.Path.
Thu Aug 12 00:47:39 CEST 2010 Petr Rockai <me at mornfall.net>
* Remove the now-redundant sp2fn.
Wed Aug 18 22:53:38 CEST 2010 Petr Rockai <me at mornfall.net>
* Optimize darcs diff.
----------
files: first-stab-at-a-hashed_storage-0_6-port_.dpatch, unnamed
messages: 12224
nosy: mornfall
status: needs-review
title: Optimize darcs diff.
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch351>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: first-stab-at-a-hashed_storage-0_6-port_.dpatch
Type: text/x-darcs-patch
Size: 168887 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20100818/8adbc864/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unnamed
Type: application/octet-stream
Size: 5 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20100818/8adbc864/attachment-0001.obj>
More information about the darcs-users
mailing list