You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Daniel L. Rall" <dl...@finemaltcoding.com> on 2008/03/13 21:22:43 UTC

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

1.5.x backport? If so, +1 from me.

On Thu, 13 Mar 2008, rooneg@tigris.org wrote:

> Author: rooneg
> Date: Thu Mar 13 12:36:22 2008
> New Revision: 29898
> 
> Log:
> Use an iteration pool when looking up entry kinds in base_dir_entries.
> 
> * subversion/libsvn_fs_base/tree.c
>   (base_dir_entries): Use an iteration pool instead of putting everything
>    in our main pool, since nothing we allocate in that loop needs to live any
>    longer than the loop body.  Also fix a typo while I'm here.
> 
> Modified:
>    trunk/subversion/libsvn_fs_base/tree.c
> 
> Modified: trunk/subversion/libsvn_fs_base/tree.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_fs_base/tree.c?pathrev=29898&r1=29897&r2=29898
> ==============================================================================
> --- trunk/subversion/libsvn_fs_base/tree.c	Thu Mar 13 10:26:54 2008	(r29897)
> +++ trunk/subversion/libsvn_fs_base/tree.c	Thu Mar 13 12:36:22 2008	(r29898)
> @@ -1451,6 +1451,7 @@ base_dir_entries(apr_hash_t **table_p,
>                   apr_pool_t *pool)
>  {
>    struct dir_entries_args args;
> +  apr_pool_t *iterpool;
>    apr_hash_t *table;
>    svn_fs_t *fs = root->fs;
>    apr_hash_index_t *hi;
> @@ -1461,6 +1462,8 @@ base_dir_entries(apr_hash_t **table_p,
>    SVN_ERR(svn_fs_base__retry_txn(root->fs, txn_body_dir_entries, &args,
>                                   pool));
>  
> +  iterpool = svn_pool_create(pool);
> +
>    /* Add in the kind data. */
>    for (hi = apr_hash_first(pool, table); hi; hi = apr_hash_next(hi))
>      {
> @@ -1468,16 +1471,20 @@ base_dir_entries(apr_hash_t **table_p,
>        struct node_kind_args nk_args;
>        void *val;
>  
> +      svn_pool_clear(iterpool);
> +
>        /* KEY will be the entry name in ancestor (about which we
> -         simple don't care), VAL the dirent. */
> +         simply don't care), VAL the dirent. */
>        apr_hash_this(hi, NULL, NULL, &val);
>        entry = val;
>        nk_args.id = entry->id;
>        SVN_ERR(svn_fs_base__retry_txn(fs, txn_body_node_kind, &nk_args,
> -                                     pool));
> +                                     iterpool));
>        entry->kind = nk_args.kind;
>      }
>  
> +  svn_pool_destroy(iterpool);
> +
>    *table_p = table;
>    return SVN_NO_ERROR;
>  }
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org

-- 

Daniel Rall

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

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Thu, Mar 13, 2008 at 5:22 PM, Daniel L. Rall <dl...@finemaltcoding.com> wrote:
> 1.5.x backport? If so, +1 from me.

Don't see why not.  I don't have a 1.5.x working copy lying around,
and I'm about to run out the door, but if nobody beats me to it I'll
merge tomorrow sometime.

-garrett

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

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

Posted by "C. Michael Pilato" <cm...@collab.net>.
Yeah, +1 from me, too.

Daniel L. Rall wrote:
> 1.5.x backport? If so, +1 from me.
> 
> On Thu, 13 Mar 2008, rooneg@tigris.org wrote:
> 
>> Author: rooneg
>> Date: Thu Mar 13 12:36:22 2008
>> New Revision: 29898
>>
>> Log:
>> Use an iteration pool when looking up entry kinds in base_dir_entries.
>>
>> * subversion/libsvn_fs_base/tree.c
>>   (base_dir_entries): Use an iteration pool instead of putting everything
>>    in our main pool, since nothing we allocate in that loop needs to live any
>>    longer than the loop body.  Also fix a typo while I'm here.
>>
>> Modified:
>>    trunk/subversion/libsvn_fs_base/tree.c
>>
>> Modified: trunk/subversion/libsvn_fs_base/tree.c
>> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_fs_base/tree.c?pathrev=29898&r1=29897&r2=29898
>> ==============================================================================
>> --- trunk/subversion/libsvn_fs_base/tree.c	Thu Mar 13 10:26:54 2008	(r29897)
>> +++ trunk/subversion/libsvn_fs_base/tree.c	Thu Mar 13 12:36:22 2008	(r29898)
>> @@ -1451,6 +1451,7 @@ base_dir_entries(apr_hash_t **table_p,
>>                   apr_pool_t *pool)
>>  {
>>    struct dir_entries_args args;
>> +  apr_pool_t *iterpool;
>>    apr_hash_t *table;
>>    svn_fs_t *fs = root->fs;
>>    apr_hash_index_t *hi;
>> @@ -1461,6 +1462,8 @@ base_dir_entries(apr_hash_t **table_p,
>>    SVN_ERR(svn_fs_base__retry_txn(root->fs, txn_body_dir_entries, &args,
>>                                   pool));
>>  
>> +  iterpool = svn_pool_create(pool);
>> +
>>    /* Add in the kind data. */
>>    for (hi = apr_hash_first(pool, table); hi; hi = apr_hash_next(hi))
>>      {
>> @@ -1468,16 +1471,20 @@ base_dir_entries(apr_hash_t **table_p,
>>        struct node_kind_args nk_args;
>>        void *val;
>>  
>> +      svn_pool_clear(iterpool);
>> +
>>        /* KEY will be the entry name in ancestor (about which we
>> -         simple don't care), VAL the dirent. */
>> +         simply don't care), VAL the dirent. */
>>        apr_hash_this(hi, NULL, NULL, &val);
>>        entry = val;
>>        nk_args.id = entry->id;
>>        SVN_ERR(svn_fs_base__retry_txn(fs, txn_body_node_kind, &nk_args,
>> -                                     pool));
>> +                                     iterpool));
>>        entry->kind = nk_args.kind;
>>      }
>>  
>> +  svn_pool_destroy(iterpool);
>> +
>>    *table_p = table;
>>    return SVN_NO_ERROR;
>>  }
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
>> For additional commands, e-mail: svn-help@subversion.tigris.org
> 


-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand