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

Re: [PATCH]: Stop putting stuff in empty props files

From: Daniel Berlin <dberlin_at_dberlin.org>
Date: 2005-10-20 19:51:52 CEST

On Thu, 2005-10-20 at 13:15 -0400, Daniel Berlin wrote:
> Actually, i think i can teach it to not create the props file if the
> hash is empty, which works on all versions (they stat the path first,
> and treat non-existence as emptyness).
>
> That works fine for my porpoises.

Yup, the attached actually works.

This is fully backwards compatible with 1.2.x due to how hash_read
works.

Again, i'd badly like this change in 1.3.x.

(In 1.4, we probably want to not create the file at all. It turns out
not everything uses empty_props_p, however, so this actually introduces
an incompatibility)

For the curious, gcc's checkout has 30k files in it

each 4 byte file was taking 1 disk block of 4096 bytes.

30k * 4k = 120 meg

multiply by 2 (one props, one props-base), and you get 240 meg.

Whee.

This also stops useless I/O when a file has no properties set, as a
side-benefit.

I've applied this to the trunk in the meanwhile.

[[[

Don't write empty hashes to the props file, it just wastes space.

* subversion/libsvn_wc/props.c (svn_wc__save_prop_file): Check hash
count before writing to file.
(empty_props_p): finfo.size == 0 is empty too.

]]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Thu Oct 20 19:53:30 2005

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.