You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@wandisco.com> on 2011/11/01 19:36:26 UTC
Re: svn commit: r1196191 - in /subversion/trunk/subversion/libsvn_wc: wc-queries.sql wc_db.c
stsp@apache.org writes:
> Author: stsp
> Date: Tue Nov 1 18:26:54 2011
> New Revision: 1196191
>
> URL: http://svn.apache.org/viewvc?rev=1196191&view=rev
> Log:
> During 'svn rm', sort the delete-list in C, rather than in SQL.
> This speeds up 'svn rm dir/*'.
>
> Also fix notification in case of cancellation. We were omitting notification
> for some nodes in the delete-list if the user cancelled early. This is wrong
> because all nodes in the delete-list are already deleted at this point.
>
> * subversion/libsvn_wc/wc-queries.sql
> (STMT_SELECT_DELETE_LIST): Don't ORDER BY.
>
> * subversion/libsvn_wc/wc_db.c
> (do_delete_notify): Sort the delete-list in C, if it is not already sorted.
> Notify for all paths in the delete-list before allowing cancellation.
Is sorting in C better than putting UNIQUE on the local_relpath column?
--
Philip
Re: svn commit: r1196191 - in /subversion/trunk/subversion/libsvn_wc:
wc-queries.sql wc_db.c
Posted by Hyrum K Wright <hy...@wandisco.com>.
On Tue, Nov 1, 2011 at 1:53 PM, Philip Martin <ph...@wandisco.com>wrote:
> Stefan Sperling <st...@elego.de> writes:
>
> > On Tue, Nov 01, 2011 at 06:36:26PM +0000, Philip Martin wrote:
> >> Is sorting in C better than putting UNIQUE on the local_relpath column?
> >
> > I don't know. I don't mind either way. Let's pick whichever is faster.
>
> I'd expect performance to be similar. I have a small preference for
> UNIQUE because it leaves sorting and memory allocation to the database.
Same here, assuming the performance is similar.
-Hyrum
--
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/
Re: svn commit: r1196191 - in /subversion/trunk/subversion/libsvn_wc: wc-queries.sql wc_db.c
Posted by Philip Martin <ph...@wandisco.com>.
Stefan Sperling <st...@elego.de> writes:
> On Tue, Nov 01, 2011 at 06:36:26PM +0000, Philip Martin wrote:
>> Is sorting in C better than putting UNIQUE on the local_relpath column?
>
> I don't know. I don't mind either way. Let's pick whichever is faster.
I'd expect performance to be similar. I have a small preference for
UNIQUE because it leaves sorting and memory allocation to the database.
--
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
Re: svn commit: r1196191 - in
/subversion/trunk/subversion/libsvn_wc: wc-queries.sql wc_db.c
Posted by Stefan Sperling <st...@elego.de>.
On Wed, Nov 02, 2011 at 01:41:29PM +0000, Philip Martin wrote:
> I've been timing the performance on NFS working copies and I can see no
> significant speed difference between using an SQLite index and sorting
> in C. So I propose to switch to the index as I believe letting the DB
> do the work is better.
I agree.
Re: svn commit: r1196191 - in /subversion/trunk/subversion/libsvn_wc: wc-queries.sql wc_db.c
Posted by Philip Martin <ph...@wandisco.com>.
Stefan Sperling <st...@elego.de> writes:
> On Wed, Nov 02, 2011 at 12:59:31PM +0000, Philip Martin wrote:
>> Stefan Sperling <st...@elego.de> writes:
>>
>> > On Tue, Nov 01, 2011 at 06:36:26PM +0000, Philip Martin wrote:
>> >> Is sorting in C better than putting UNIQUE on the local_relpath column?
>> >
>> > I don't know. I don't mind either way. Let's pick whichever is faster.
>> >
>> > The notification/cancellation fix is needed in either case.
>>
>> I think the cacellation change is wrong. This is happening inside an
>> SQLite transaction. When the user cancels a delete operation during
>> notification the cancel callback will return an svn_error_t causing the
>> transaction to abort. That means that no change will have been made to
>> the database. I don't see how postponing that abort until all the
>> notifications have been made is an improvement.
>
> The transaction is already done when notification happens.
> See wc_db.c:with_finalization() -- notification is performed by
> the work_cb() callback, not the txn_cb() callback.
OK.
I've been timing the performance on NFS working copies and I can see no
significant speed difference between using an SQLite index and sorting
in C. So I propose to switch to the index as I believe letting the DB
do the work is better.
--
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
Re: svn commit: r1196191 - in
/subversion/trunk/subversion/libsvn_wc: wc-queries.sql wc_db.c
Posted by Stefan Sperling <st...@elego.de>.
On Wed, Nov 02, 2011 at 12:59:31PM +0000, Philip Martin wrote:
> Stefan Sperling <st...@elego.de> writes:
>
> > On Tue, Nov 01, 2011 at 06:36:26PM +0000, Philip Martin wrote:
> >> Is sorting in C better than putting UNIQUE on the local_relpath column?
> >
> > I don't know. I don't mind either way. Let's pick whichever is faster.
> >
> > The notification/cancellation fix is needed in either case.
>
> I think the cacellation change is wrong. This is happening inside an
> SQLite transaction. When the user cancels a delete operation during
> notification the cancel callback will return an svn_error_t causing the
> transaction to abort. That means that no change will have been made to
> the database. I don't see how postponing that abort until all the
> notifications have been made is an improvement.
The transaction is already done when notification happens.
See wc_db.c:with_finalization() -- notification is performed by
the work_cb() callback, not the txn_cb() callback.
Re: svn commit: r1196191 - in /subversion/trunk/subversion/libsvn_wc: wc-queries.sql wc_db.c
Posted by Philip Martin <ph...@wandisco.com>.
Stefan Sperling <st...@elego.de> writes:
> On Tue, Nov 01, 2011 at 06:36:26PM +0000, Philip Martin wrote:
>> Is sorting in C better than putting UNIQUE on the local_relpath column?
>
> I don't know. I don't mind either way. Let's pick whichever is faster.
>
> The notification/cancellation fix is needed in either case.
I think the cacellation change is wrong. This is happening inside an
SQLite transaction. When the user cancels a delete operation during
notification the cancel callback will return an svn_error_t causing the
transaction to abort. That means that no change will have been made to
the database. I don't see how postponing that abort until all the
notifications have been made is an improvement.
--
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
Re: svn commit: r1196191 - in
/subversion/trunk/subversion/libsvn_wc: wc-queries.sql wc_db.c
Posted by Stefan Sperling <st...@elego.de>.
On Tue, Nov 01, 2011 at 06:36:26PM +0000, Philip Martin wrote:
> Is sorting in C better than putting UNIQUE on the local_relpath column?
I don't know. I don't mind either way. Let's pick whichever is faster.
The notification/cancellation fix is needed in either case.