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

Re: WC modification detection is reading whole files

From: <kfogel_at_collab.net>
Date: 2006-02-17 07:35:01 CET

David James <djames@collab.net> writes:
> So if the timestamp is the same, but the size differs, we return "not
> modified"? That seems strange to me.

I may have put them in the wrong order. (Actually, I think we may
have implemented it that way first, then realized that we could get
the size at the same time as we get the timestamp, so we might as well
check size first.)

But now that I go look at the code, things are even weirder than that.
The algorithm is implemented clearly only in libsvn_wc/props.c -- and
it duplicates the stat() calls, sadly. Comments there confirm this
was not done unknowingly, at least.

What about text bases? Are we really ignoring the filesizes there
completely? Oh... no, I think I see: follow the logic in
svn_wc_text_modified_p2() and you'll see what's going on. Again, we
end up duplicating stat() calls. And we check the timestamp first,
but only if no force_comparison flag was passed.

This is somewhat dissatisfying. If we had a function that would use
one stat() call to get both a file's size and its modtime, then we
could do all this more efficiently. It seems we decided to let API
cleanliness govern code flow.

Hmmm. I'm not sure I want to do anything about this (other bugs to
fix), but then again I'm not sure I want to *not* do anything about it
either. Thoughts?

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Feb 17 09:17:45 2006

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.