[darcs-users] the readability of darcs native change format (was: Re: SchwernLikesDarcs SchwernHatesDarcs)
droundy at abridgegame.org
Sun Mar 20 11:04:06 UTC 2005
On Sun, Mar 20, 2005 at 12:22:09AM -0800, Michael G Schwern wrote:
> On Sun, Mar 20, 2005 at 03:27:25AM +0000, Mark Stosberg wrote:
> > I understand this much about the technical details of the darcs patch
> > format:
> > - It saves disk space by not storing context in the patches.
> > - Consequently, there can be a performance penalty for constructing
> > the context to display it, since it's not in the patch.
> > Personally, sometimes I like the lack of context because it's compact.
> > If I'm reviewing patches during 'record', I might have the context in my
> > head, and don't need to to take up screen real estate right then.
> > Other times I would like to have that context, and would just assume
> > that darcs used more disk space and gave me better performance.
> "Disk is cheap" is an oft uttered phrase. However, for many cases (such as
> darcs record) darcs should be able to do a simple diff between the changed
> version and the original version stored in _darcs. So no performance
> penalty. This is my utterly naive analysis and I'd like to keep premature
> optimization out of the discussion for the time being. We really don't know
> how much of a performance difference it would make. Better to discuss
> the feature's merits and drawbacks rather than some hand-waving performance
It's not so much about the disk space as the bandwidth. Bandwidth is also
cheap, but not so cheap as disk space. On the other hand, an option to
store patches with context wouldn't be bad, and you could use it in
repositories that aren't available for pull, where bandwidth isn't an
issue. It'd be sort of like the --compress options, which exist for the
same reason--it's faster uncompressed, but you don't want to take extra
bandwidth when downloading.
> And in most cases I want context. I don't have a very good memory, or
> rather I choose to store more important things in it. Things the computer
> cannot easily make available to me.
Indeed, getting the context along with the patches in most of the
interactive commands is just an issue of coding, and would definitely be
nice. The coding's a bit of a pain, which is why it hasn't been done, but
not *that* much. In fact, there is an (unused) parameter passed to
"with_selected_patches_*" (the interface routines) specifically intended to
So perhaps you can motivate an enterprising darcs hacker to add context to
the interactive display. Or you could wait until I have more time, and
then remind me. It's probably a three-morning job for me, and a quite
doable job for moderately experienced darcs contributors (e.g. Karel or
Tommy), although it'll require significant thinking and reading of code.
More information about the darcs-users