[darcs-devel] [patch1823] v3: basic implementation and tests

Ganesh Sittampalam bugs at darcs.net
Sat Jun 15 10:55:50 UTC 2019


Ganesh Sittampalam <ganesh at earth.li> added the comment:

> Again, certainly possible. But remember that the PrimPatchId is
> part of the on-disk representation. Using the full meta-data
> would make patches quite a bit larger, slowing down read and
> write of patches and also equality tests. And since we read 
> PrimPatchIds from disk, we cannot (at least not automatically) 
> share equal PrimPatchIds in memory, so memory requirements
> would also go up significantly.

Yeah. I was thinking that the on-disk representation could elide the 
PrimPatchId when it's the same as that of the containing patch, so
it'd only be needed for conflicts.

When reading patches, this would also implicitly mean we get back 
most of the sharing.

A pointer is smaller than a SHA1, so this would be a win for the
non-conflicting case.

We could also choose to use hash-consing to get back sharing for
the conflicting case, at the cost of some speed when reading, and
extra code complexity in reading patches.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1823>
__________________________________


More information about the darcs-devel mailing list