[RFC] Reworking 'commit' internals to work in texts rather than 'lines'
Aaron Bentley
aaron at aaronbentley.com
Mon Apr 27 19:29:58 BST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
> The main change is to avoid "KnitVersionedFile.add_lines()" and instead
> go for something along the lines of "KVF.add_text()" which takes a
> single string.
Maybe it's too early to worry about this, but since you are proposing a
reimplementation, what about a chunked interface instead?
I think chunked interfaces are a great compromise between whole-text and
line-based interfaces. Like line-based interfaces, they don't require a
whole copy of the file to be loaded into memory. (Better than
line-based interfaces, they don't even require you to load a whole line
into memory.) Like whole-text interfaces, you can read a lot of data at
once, without any parsing. And it's trivial to use either lines or
fulltexts with a chunked interface.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkn1+aMACgkQ0F+nu1YWqI3wLQCdGUuPCpkNQYpZl9sXzbhbVKtU
SksAnA2fftUB1N9FUBYYp5MGjEpMnnDV
=/lJp
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list