Overview
SHA1 Hash: | 0afb5e8e39c3865cabcd5d4fe09c3c4bc95e6300 |
---|---|
Date: | 2008-03-08 14:52:56 |
User: | drh |
Comment: | 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. |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/clone.c from [f1103d57a0] to [f6aae5647c].
@@ -74,7 +74,8 @@ } db_finalize(&q); }else{ client_sync(0,0,1); } + verify_cancel(); db_end_transaction(0); }
Modified src/manifest.c from [64e207831c] to [8e8e54e6bf].
@@ -53,11 +53,10 @@ struct Manifest { Blob content; /* The original content blob */ int type; /* Type of file */ int mode; /* Access mode */ char *zComment; /* Decoded comment */ - char zUuid[UUID_SIZE+1]; /* Self UUID */ double rDate; /* Time in the "D" line */ char *zUser; /* Name of the user */ char *zRepoCksum; /* MD5 checksum of the baseline content */ char *zWiki; /* Text of the wiki page */ char *zWikiTitle; /* Name of the wiki page */ @@ -143,18 +142,14 @@ int manifest_parse(Manifest *p, Blob *pContent){ int seenHeader = 0; int seenZ = 0; int i, lineNo=0; Blob line, token, a1, a2, a3; - Blob selfuuid; char cPrevType = 0; memset(p, 0, sizeof(*p)); memcpy(&p->content, pContent, sizeof(p->content)); - sha1sum_blob(&p->content, &selfuuid); - memcpy(p->zUuid, blob_buffer(&selfuuid), UUID_SIZE); - p->zUuid[UUID_SIZE] = 0; blob_zero(pContent); pContent = &p->content; blob_zero(&a1); blob_zero(&a2); @@ -486,11 +481,11 @@ defossilize(zValue); } if( blob_size(&a2)==UUID_SIZE && validate16(zUuid, UUID_SIZE) ){ /* A valid uuid */ }else if( blob_size(&a2)==1 && zUuid[0]=='*' ){ - zUuid = p->zUuid; + zUuid = 0; }else{ goto manifest_syntax_error; } defossilize(zName); if( zName[0]!='-' && zName[0]!='+' && zName[0]!='*' ){ @@ -823,11 +818,15 @@ } if( m.type==CFTYPE_CONTROL || m.type==CFTYPE_MANIFEST ){ for(i=0; i<m.nTag; i++){ int tid; int type; - tid = uuid_to_rid(m.aTag[i].zUuid, 1); + if( m.aTag[i].zUuid ){ + tid = uuid_to_rid(m.aTag[i].zUuid, 1); + }else{ + tid = rid; + } switch( m.aTag[i].zName[0] ){ case '+': type = 1; break; case '*': type = 2; break; case '-': type = 0; break; default:
Modified src/verify.c from [f05153c954] to [4c09bcd36f].
@@ -102,10 +102,17 @@ } assert( !inFinalVerify ); if( rid>0 ){ bag_insert(&toVerify, rid); } +} + +/* +** Cancel all pending verification operations. +*/ +void verify_cancel(void){ + bag_clear(&toVerify); } /* ** COMMAND: test-verify-all **
Modified src/xfer.c from [f7995ea18a] to [e66b8e6193].
@@ -770,17 +770,18 @@ nMsg += send_unclustered(&xfer); } /* Exchange messages with the server */ nFileSend = xfer.nFileSent + xfer.nDeltaSent; - printf("Send: %10d bytes, %3d messages, %3d files (%d+%d)\n", + printf("Sent: %10d bytes, %4d messages, %4d 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); http_exchange(&send, &recv); blob_reset(&send); /* Begin constructing the next message (which might never be ** sent) by beginning with the pull or push messages @@ -798,10 +799,13 @@ while( blob_line(&recv, &xfer.line) ){ if( blob_buffer(&xfer.line)[0]=='#' ){ continue; } xfer.nToken = blob_tokenize(&xfer.line, xfer.aToken, count(xfer.aToken)); + nMsg++; + printf("\r%d", nMsg); + fflush(stdout); /* file UUID SIZE \n CONTENT ** file UUID DELTASRC SIZE \n CONTENT ** ** Receive a file transmitted from the server. @@ -818,11 +822,10 @@ */ if( blob_eq(&xfer.aToken[0], "gimme") && xfer.nToken==2 && blob_is_uuid(&xfer.aToken[1]) ){ - nMsg++; if( pushFlag ){ int rid = rid_from_uuid(&xfer.aToken[1], 0); send_file(&xfer, rid, &xfer.aToken[1], 0); } }else @@ -838,11 +841,10 @@ if( xfer.nToken==2 && blob_eq(&xfer.aToken[0], "igot") && blob_is_uuid(&xfer.aToken[1]) ){ int rid = 0; - nMsg++; if( pullFlag || cloneFlag ){ if( !db_exists("SELECT 1 FROM blob WHERE uuid='%b' AND size>=0", &xfer.aToken[1]) ){ rid = content_put(0, blob_str(&xfer.aToken[1]), 0); newPhantom = 1; @@ -867,11 +869,10 @@ && blob_is_uuid(&xfer.aToken[2]) ){ if( blob_eq_str(&xfer.aToken[1], zSCode, -1) ){ fossil_fatal("server loop"); } - nMsg++; if( zPCode==0 ){ zPCode = mprintf("%b", &xfer.aToken[2]); db_set("project-code", zPCode, 0); } blob_appendf(&send, "clone\n"); @@ -920,11 +921,11 @@ fossil_fatal("%b", &xfer.err); } blobarray_reset(xfer.aToken, xfer.nToken); blob_reset(&xfer.line); } - printf("Received: %10d bytes, %3d messages, %3d files (%d+%d+%d)\n", + printf("\rReceived: %10d bytes, %4d messages, %4d files (%d+%d+%d)\n", blob_size(&recv), nMsg, xfer.nFileRcvd + xfer.nDeltaRcvd + xfer.nDanglingFile, xfer.nFileRcvd, xfer.nDeltaRcvd, xfer.nDanglingFile); blob_reset(&recv);