[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] svn_fs_text_changed

From: Chia-liang Kao <clkao_at_clkao.org>
Date: 2003-11-25 16:13:41 CET

> > * include/svn_fs.h
> > (svn_fs_text_changed): New.
> Hm. Nasty. Why did you add a new public FS interface which does
> nothing but call other public FS interfaces and is used in exactly one
> place in the code? Bad plan, homey. Your svn_fs_text_changed()
> implementation should just be a helper function in delta.c.

I don't have any strong opinion whether this should be a public api, i
just think that could be useful somehow. perhaps it could be a helper
function in svn_io.h that wc's versioned_file_modified_p could also

> Best case is if the file sizes differ. In this case the
> code runs over the bytes of the two sets of contents, and
> calculates a diff. If the file sizes do not differ, the
> code runs over the bytes of the two sets of contents until
> a differing byte is found, and then runs back over the
> bytes again to calculate a diff. It then transmits that
> diff, which is applied on the client side.

Adding md5 checks before the byte-by-byte checks could catch the
differences earlier between some fixed-size binaries.

> 2. Contents are the same.
> This change removes vdelta computation alone (doesn't save you a
> trip over the bytes, including undeltification to read the
> bytes). This change removes transmission of an insignificant
> amount of data (an empty delta) across the network. (You can't
> count the removal of the no-op fulltext reconstruction on the
> client side because an empty diff is trivially detectable -- our
> code could fix this right now with no server-side changes[1].)

Well, it seems to me more like a consistencies fix for editors: today
they already know if open_file is called but no apply_textdelta called,
it means the file content isn't modified. While with a wrapper to
window_handler, you'll have to change every editor, and have call stack
overhead for every window, although also insignificant.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 25 16:15:20 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.