Just for discussion/experimentation for now.
Guillaume mentioned on IRC that darcs might be holding all
the patches in memory when building a patch index from scratch.
This change ought to make it more incremental as PatchSet is
the standard structure for reading a repository lazily, but
in practice I don't see much difference in memory usage
with +RTS -s
2 patches for repository darcs-unstable@darcs.net:screened:
Thu Nov 13 07:26:27 GMT 2014 Ganesh Sittampalam <ganesh@earth.li>
* refactor patch index code a bit
- generalise return type of patches2patchMods to make it easier
to call incrementally
- abstract out patchSet2patchMods in preparation for a more
efficient implementation
Thu Nov 13 07:40:15 GMT 2014 Ganesh Sittampalam <ganesh@earth.li>
* try to build patch index incrementally
I'm having the following error on darcs.net with your patches:
$ darcs optimize enable-patch-index +RTS -prof
darcs: error: patch index entry for file ./Repository.lhs created >1 times
Apologies, I forgot to actually run the locally built darcs
when I was testing this :-)
Still doesn't seem any faster/less memory hungry in practice
though.
2 patches for repository darcs-unstable@darcs.net:screened:
Thu Nov 13 07:26:27 GMT 2014 Ganesh Sittampalam <ganesh@earth.li>
* refactor patch index code a bit
- generalise return type of patches2patchMods to make it easier
to call incrementally
- abstract out patchSet2patchMods in preparation for a more
efficient implementation
Thu Nov 13 18:18:11 GMT 2014 Ganesh Sittampalam <ganesh@earth.li>
* try to build patch index incrementally