I have done a little experiment using GHC profiler. For all I can say, the Convert code did not
change at all since 2.3, and I see this:
darcs-HEAD+prof +RTS -P -RTS convert mmap mmap-darcs2
total time = 84.16 secs (4208 ticks @ 20 ms)
total alloc = 16,109,995,604 bytes (excludes profiling overheads)
COST CENTRE MODULE %time %alloc ticks bytes
commute_filedir Darcs.Patch.Prim 14.5 0.0 612 15723
speedy_commute Darcs.Patch.Prim 13.7 0.1 577 4345525
commute_a72FB Darcs.Patch.Real 10.6 0.0 448 243
==_a4RA9 Darcs.Patch.Prim 8.3 22.6 351 910917284
commuteHunk Darcs.Patch.Prim 7.4 14.2 310 569936181
commute_no_conflicts_a72SH Darcs.Patch.Real 6.7 10.1 280 407613613
unsafeCompare_a4RIe Darcs.Patch.Prim 4.0 0.0 170 0
is_filepatch Darcs.Patch.Prim 3.4 5.4 143 217615670
headPermutationsFL Darcs.Patch.Permutations 2.7 7.8 114 313186829
everything_else_commute Darcs.Patch.Prim 2.6 0.0 110 0
assertConsistent Darcs.Patch.Real 2.5 0.0 104 0
commute_a4RIE Darcs.Patch.Prim 2.4 2.7 100 109586920
lengthFL Darcs.Witnesses.Ordered 2.1 4.4 89 178085076
The same conversion with darcs-2.3 is instantaneous (compared to half a minute without profiling
and well over a minute with profiling on darcs-2.4/HEAD). For all I can say, something went
horribly wrong in our commutation functions. (All this gets forced in tentativelyMergePatches, in
this "merge": pend' :/\: pw <- return $ merge (pc :\/: anonpend :>: NilFL)).
It *might* be due to pend being something else in 2.4 than it is in 2.3, I'll investigate that
later. I have expected it to be empty, but it's not in 2.4... I'll check with 2.3 as soon as I
manage to build it.
|