Hi,

> I've read some of the source code, but I have one question for the
> more experienced hackers: during the apply of a patch, darcs load the
> whole file in memory and then writes it back, or it uses smart
> "offset" tricks to read and write only specific parts of the file?

I haven't had a very deep look, so this is my best guess: the former.
I say this because hunk modifications end up calling

 Darcs.Patch.Apply.applyFL, which calls

 Darcs.IO.WriteableDirectory.modifyFilePS, which by default, is
   implemented by reading the file in as a PackedString, doing
   something to it and writing it back out.

I don't notice any other implementation overriding this default
behaviour (grep -r mModifyFilePS src), so I conclude that it must always
work that way.

Hope that helps,

-- 
Eric Kow                     http://www.loria.fr/~kow
PGP Key ID: 08AC04F9         Merci de corriger mon français.

Attachment: pgpsNAd9HY0jz.pgp
Description: PGP signature

_______________________________________________
darcs-devel mailing list
darcs-devel@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-devel

Reply via email to