Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Speed enhancement in the findSrcid() routine of content.c. Allow 5 digit numbers on counts while syncing. |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
8010bb41e1c777a5a0d57e03edc7f7ba |
| User & Date: | drh 2008-03-08 18:59:00.000 |
Context
|
2008-03-08
| ||
| 19:42 | Additional speed improvements for clone and rebuild. check-in: 043d63d4aa user: drh tags: trunk | |
| 18:59 | Speed enhancement in the findSrcid() routine of content.c. Allow 5 digit numbers on counts while syncing. check-in: 8010bb41e1 user: drh tags: trunk | |
| 14:52 | This version is able to clone the entire TCL repository in 12.5 minutes and to rebuild the cloned TCL repository in 2.5 minutes. There is still a lot of performance work to be done, but this is good enough for the time being. check-in: 0afb5e8e39 user: drh tags: trunk | |
Changes
Changes to src/content.c.
| ︙ | ︙ | |||
79 80 81 82 83 84 85 |
}
/*
** Return the srcid associated with rid. Or return 0 if rid is
** original content and not a delta.
*/
static int findSrcid(int rid){
| > > | > > > > > > > | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
}
/*
** Return the srcid associated with rid. Or return 0 if rid is
** original content and not a delta.
*/
static int findSrcid(int rid){
static Stmt q;
int srcid;
db_static_prepare(&q, "SELECT srcid FROM delta WHERE rid=:rid");
db_bind_int(&q, ":rid", rid);
if( db_step(&q)==SQLITE_ROW ){
srcid = db_column_int(&q, 0);
}else{
srcid = 0;
}
db_reset(&q);
return srcid;
}
/*
** Check to see if content is available for artifact "rid". Return
** true if it is. Return false if rid is a phantom or depends on
** a phantom.
|
| ︙ | ︙ |
Changes to src/xfer.c.
| ︙ | ︙ | |||
768 769 770 771 772 773 774 |
if( pushFlag ){
send_unsent(&xfer);
nMsg += send_unclustered(&xfer);
}
/* Exchange messages with the server */
nFileSend = xfer.nFileSent + xfer.nDeltaSent;
| | | 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 |
if( pushFlag ){
send_unsent(&xfer);
nMsg += send_unclustered(&xfer);
}
/* Exchange messages with the server */
nFileSend = xfer.nFileSent + xfer.nDeltaSent;
printf("Sent: %10d bytes, %5d messages, %5d files (%d+%d)\n",
blob_size(&send), nMsg+xfer.nGimmeSent+xfer.nIGotSent,
nFileSend, xfer.nFileSent, xfer.nDeltaSent);
nMsg = 0;
xfer.nFileSent = 0;
xfer.nDeltaSent = 0;
xfer.nGimmeSent = 0;
fflush(stdout);
|
| ︙ | ︙ | |||
919 920 921 922 923 924 925 |
if( blob_size(&xfer.err) ){
fossil_fatal("%b", &xfer.err);
}
blobarray_reset(xfer.aToken, xfer.nToken);
blob_reset(&xfer.line);
}
| | | 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 |
if( blob_size(&xfer.err) ){
fossil_fatal("%b", &xfer.err);
}
blobarray_reset(xfer.aToken, xfer.nToken);
blob_reset(&xfer.line);
}
printf("\rReceived: %10d bytes, %5d messages, %5d files (%d+%d+%d)\n",
blob_size(&recv), nMsg,
xfer.nFileRcvd + xfer.nDeltaRcvd + xfer.nDanglingFile,
xfer.nFileRcvd, xfer.nDeltaRcvd, xfer.nDanglingFile);
blob_reset(&recv);
nCycle++;
go = 0;
|
| ︙ | ︙ |