/ Changes On Branch btree-balance-bias
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch btree-balance-bias Excluding Merge-Ins

This is equivalent to a diff from face33bea1 to 46bd9533c0

2016-07-16
11:47
Temporarily add extra sqlite3_log() calls to this version to help with debugging a performance problem. (check-in: 613c1ceaf4 user: dan tags: debug)
2016-07-14
20:19
Experimental patch restore the slight bias in btree-balancing immediately after the change to reduces the amount of memcpy() work done by balancing. (Leaf check-in: 46bd9533c0 user: drh tags: btree-balance-bias)
2014-10-27
18:21
Fix an unused variable in btree.c:allocateSpace(). (check-in: 637246165a user: drh tags: trunk)
14:26
Optimizations aimed at reducing the number of memcpy() operations required by balance_nonroot(). (check-in: face33bea1 user: dan tags: trunk)
11:25
Add test file e_wal.test. (check-in: fc6920b548 user: dan tags: trunk)
08:02
If a free-slot is found within a page, but using that free-slot would fragment the page further and there are already at least 60 fragmented bytes, degragment the page. This matches the behaviour of the trunk. (Closed-Leaf check-in: 1f80f8c136 user: dan tags: defrag-opt)

Changes to src/btree.c.

6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
    int d;              /* Index of first cell to the left of right sibling */

    r = cntNew[i-1] - 1;
    d = r + 1 - leafData;
    assert( d<nMaxCells );
    assert( r<nMaxCells );
    while( szRight==0 
       || (!bBulk && szRight+szCell[d]+2<=szLeft-(szCell[r]+2)) 
    ){
      szRight += szCell[d] + 2;
      szLeft -= szCell[r] + 2;
      cntNew[i-1]--;
      r = cntNew[i-1] - 1;
      d = r + 1 - leafData;
    }







|







6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
    int d;              /* Index of first cell to the left of right sibling */

    r = cntNew[i-1] - 1;
    d = r + 1 - leafData;
    assert( d<nMaxCells );
    assert( r<nMaxCells );
    while( szRight==0 
       || (!bBulk && szRight+szCell[d]+2<=szLeft-(szCell[r]+(i==k-1?0:2))) 
    ){
      szRight += szCell[d] + 2;
      szLeft -= szCell[r] + 2;
      cntNew[i-1]--;
      r = cntNew[i-1] - 1;
      d = r + 1 - leafData;
    }