I've found an optimization which would fit nicely in the 1.4
'libsvn_wc optimizing release': libsvn_wc calls svn_io_file_checksum
on files it just read or wrote - meaning it reads them again to
calculate the checksum.
My plan involves:
- creating an svn_stream_checksummed, like svn_subst_stream_translated.
- let the stream raise an error on close if the stream checksum
doesn't match a given checksum value (with an error message text
passed to it on creation)
- create svn_stream_checksummed_get_sum() to retrieve the checksum
from the checksummed stream
- add the checksumming stream to the source stream in
The last step optimizes the common case which is supposed to pass the
checksum test. In the uncommon case of not passing the checksum test,
we read too much off the network, but the common case reads the text
The svn_stream_checksummed_get_sum() can be used later to do something
similar with streams that are being written, for which we need the
checksum later on.
Received on Tue Dec 6 10:06:21 2005