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

Re: svn commit: r31820 - trunk/subversion/libsvn_fs_base

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Sun, 22 Jun 2008 17:24:26 -0400

cmpilato_at_tigris.org writes:
> Log:
> Avoid a bunch of unnecessary database queries during the post-commit
> deltification phase in Berkeley DB repositories.
>
> deltify_mutable(), when recursing, iterates over directory entries,
> calling itself. The first thing it does is check the provided path's
> node kind and node-revision-ID. But both of those pieces of
> information are already available in the entries over which the caller
> is iterating! So, this change just lets the caller pass the
> information it already has on hand into deltify_mutable(). This has
> significant impact in some situations. On a test repository
> containing a directory of almost 20,000 files, commit which removed 10
> of those files at a time went from spending 13 minutes in delification
> to just a few seconds.

How could we not have done this in 1982? Wow.

Nice work, Mike :-).

> --- trunk/subversion/libsvn_fs_base/tree.c (r31819)
> +++ trunk/subversion/libsvn_fs_base/tree.c (r31820)
> @@ -2686,7 +2698,7 @@ svn_fs_base__deltify(svn_fs_t *fs,
> args.revision = revision;
> SVN_ERR(svn_fs_base__retry_txn(fs, txn_body_rev_get_txn_id, &args, pool));
>
> - return deltify_mutable(fs, root, "/", txn_id, pool);
> + return deltify_mutable(fs, root, "/", NULL, svn_node_unknown, txn_id, pool);
> }

Why not pass svn_node_dir instead of svn_node_unknown? Root directory
ain't never gonna be a file :-).

It doesn't matter so much here, of course -- the real win is in the
recursive call, where you do pass both.

With or without the trivial change proposed above, I'm about to add my
+1 to this in 1.5.x/STATUS.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-06-22 23:24:49 CEST

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.