[darcs-devel] [issue2491] optimize 'slightlyOptimizePatchset' for big inventories

Guillaume Hoffmann bugs at darcs.net
Mon Jan 25 17:55:45 UTC 2016

New submission from Guillaume Hoffmann <guillaumh at gmail.com>:

When importing git's git repository to darcs (using the current darcs
HEAD) I ended up with 47K patches inside of a single
tentative_hashed_inventory file.

The last step of the import is a call to slightlyOptimizePatchset, which
shows the message "Optimizing inventory".

After 1 hour of computation of this function I killed darcs, moved
tentative_hashed_inventory to hashed_inventory and ran "darcs repair",
which worked. Here is the `_darcs` of the repository:


To run slightlyOptimizePatchset on that repo, one way is to run "darcs
optimize reorder" , which will run
Darcs.Repository.Internal.reorderInventory, do some patch replacement
and then call HashedRepo.finalizeTentativeChanges which will call

We should understand what is the source of this issue. Memory profiling
would be useful to do.

messages: 18963
nosy: gh
status: unknown
title: optimize 'slightlyOptimizePatchset' for big inventories

Darcs bug tracker <bugs at darcs.net>

More information about the darcs-devel mailing list