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

Re: delta combiner sloooooooowwwwww

From: Daniel Berlin <dberlin_at_dberlin.org>
Date: 2005-02-10 16:52:16 CET

On Thu, 2005-02-10 at 10:46 -0500, Daniel Berlin wrote:
> > Yup. At least I'm glad I was right about that. :-\
> >
> > We do know from other measurements that using the delta combiner is
> > better than just applying the deltas in series (generating intermediate
> > fulltexts). But that's not much consolation.
> >
> > Since we're looking specifically at blame, I suspect the best way to
> > improve perfoemance would be to do what I suggested earlier, that is,
> > teach get_file_revs to not recrete every fulltext from scratch.
> It doesn't though.
> Look at svn_repos_get_file_revs

I stupidly forgot to include the surrounding loop:

  /* Walk through the revisions in chronological order. */
  for (i = revnums->nelts; i > 0; --i)
    {
      svn_revnum_t rev = APR_ARRAY_IDX (revnums, i - 1, svn_revnum_t);
      const char *rev_path = APR_ARRAY_IDX (paths, i - 1, const char *);
      apr_hash_t *rev_props;
      apr_hash_t *props;
....

      /* Open the revision root. */
      SVN_ERR (svn_fs_revision_root (&root, repos->fs, rev, iter_pool));

>
> /* Compute and send delta if client asked for it.
> Note that this was initialized to NULL, so if !
> contents_changed,
> no deltas will be computed. */
> if (delta_handler)
> {
> /* Get the content delta. */
> SVN_ERR (svn_fs_get_file_delta_stream (&delta_stream,
> last_root, last_path,
> root, rev_path,
> iter_pool));
> /* And send. */
> SVN_ERR (svn_txdelta_send_txstream (delta_stream,
> delta_handler,
> delta_baton,
> iter_pool));
> }
>

...

      /* Remember root, path and props for next iteration. */
      last_root = root;
      last_path = rev_path;
      last_props = props;

      /* Swap the pools. */
      tmp_pool = iter_pool;
      iter_pool = last_pool;
      last_pool = tmp_pool;

}
> Note that it's sending a delta between the last revision it sent, and
> the current revision, and the client is recreating the fulltext by
> applying that delta to the last thing it received.
>
> Thus, it only sends one actual fulltext.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Feb 10 16:53:45 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.