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

Re: svn commit: r1040663 - in /subversion/trunk/subversion/libsvn_wc: wc-queries.sql wc_db.c

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Wed, 1 Dec 2010 05:41:06 +0200

julianfoad_at_apache.org wrote on Tue, Nov 30, 2010 at 18:07:52 -0000:
> + /* Remove each remaining pristine that is listed in SHA1S. */
> + for (hi = apr_hash_first(scratch_pool, sha1s);
> + hi; hi = apr_hash_next(hi))
> + {
> + const unsigned char *sha1_digest = svn__apr_hash_index_key(hi);
> + const svn_checksum_t *sha1_checksum
> + = svn_checksum__from_digest(sha1_digest, svn_checksum_sha1,
> + scratch_pool);
> +
> + SVN_ERR(pristine_remove(pdh, sha1_checksum, scratch_pool));
> + }

So we loop over the remaining sha1's and remove each of them...
I wonder if there is room for further optimization here? e.g., does
this prepare/reset the statement just once, or once per iteration?

Daniel
(I hope the question makes sense --- I'm not very familiar with
the svn_sqlite__* API)
Received on 2010-12-01 04:49:49 CET

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.