[darcs-users] Possibly a very simplistic solution

Ketil Malde ketil at ii.uib.no
Fri May 21 12:17:08 UTC 2004


David Roundy <droundy at abridgegame.org> writes:

>> Couldn't you sync (lazily) after a diff has been needlessly run on
>> identical files, instead of randomly?  Then only the first whatsnew
>> will slow. 

> The trouble is that the diff function is a "pure" function (i.e. no IO),
> which is nice, and is what will make the proposed transition to a database
> for _darcs/current relatively easy, but means that the syncing can't
> easily be done in response to the diff.  Basically I'd need to create a
> separate "IO" version of the diff routine that would also do a sync.

Oh, rigth.  I only have an old version of the code at hand, but it
looks to me as if (smart_)diff is currently being called from IO
functions -- but alas, usually on the whole repo.  So you need that
IO-wrapped diff, it seems.

> On the other hand, this would definitely be the most efficient way to
> go--it would eliminate all unnecesary directory traversals and stats.
> There might even be a "performUnsafeIO" way I could do this with minimal
> hideousness.



More information about the darcs-users mailing list