Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Minor bug fixes in the new merge-riser coalescing logic of the graph generator. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
7688673a8e0bd805bdb4e6a1ebcea7d7 |
| User & Date: | drh 2020-06-08 18:13:03.325 |
Context
|
2020-06-08
| ||
| 18:27 | Add test cases for the merge-riser coalescing logic. ... (check-in: e4e5b771d2 user: drh tags: trunk) | |
| 18:13 | Minor bug fixes in the new merge-riser coalescing logic of the graph generator. ... (check-in: 7688673a8e user: drh tags: trunk) | |
| 17:10 | Graph improvement: When there are multiple inbound merge arrows, try to combine as many as possible into a single riser. ... (check-in: 1eb9f5a81a user: drh tags: trunk) | |
Changes
Changes to src/graph.c.
| ︙ | ︙ | |||
726 727 728 729 730 731 732 |
for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
int iReuseIdx = -1;
int iReuseRail = -1;
int isCherrypick = 0;
for(i=1; i<pRow->nParent; i++){
int parentRid = pRow->aParent[i];
if( i==pRow->nNonCherrypick ){
| > > > | | | 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 |
for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
int iReuseIdx = -1;
int iReuseRail = -1;
int isCherrypick = 0;
for(i=1; i<pRow->nParent; i++){
int parentRid = pRow->aParent[i];
if( i==pRow->nNonCherrypick ){
/* Because full merges are laid out before cherrypicks,
** it is ok to use a full-merge raise for a cherrypick.
** See the graph on check-in 8ac66ef33b464d28 for example
** iReuseIdx = -1;
** iReuseRail = -1; */
isCherrypick = 1;
}
pDesc = hashFind(p, parentRid);
if( pDesc==0 ){
/* Merge from a node that is off-screen */
if( iReuseIdx>=p->nRow+1 ){
continue; /* Suppress multiple off-screen merges */
|
| ︙ | ︙ | |||
778 779 780 781 782 783 784 |
pDesc->hasNormalOutMerge = 1;
pDesc->mergeUpto = pDesc->idx;
}
}else{
/* Create a new merge for an on-screen node */
createMergeRiser(p, pDesc, pRow, isCherrypick);
if( p->mxRail>=GR_MAX_RAIL ) return;
| | > > > | 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 |
pDesc->hasNormalOutMerge = 1;
pDesc->mergeUpto = pDesc->idx;
}
}else{
/* Create a new merge for an on-screen node */
createMergeRiser(p, pDesc, pRow, isCherrypick);
if( p->mxRail>=GR_MAX_RAIL ) return;
if( iReuseIdx<0
&& pDesc->nMergeChild==1
&& (pDesc->iRail!=pDesc->mergeOut || pDesc->isLeaf)
){
iReuseIdx = pDesc->idx;
iReuseRail = pDesc->mergeOut;
}
}
}
}
}
|
| ︙ | ︙ |
Changes to src/graph.js.
| ︙ | ︙ | |||
440 441 442 443 444 445 446 |
if( isCP ){
drawCherrypickLine(x0,y0,x1+dx,null);
cls = "arrow cherrypick " + (x1<x0 ? "l" : "r");
}else{
drawMergeLine(x0,y0,x1+dx,null);
cls = "arrow merge " + (x1<x0 ? "l" : "r");
}
| | | 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
if( isCP ){
drawCherrypickLine(x0,y0,x1+dx,null);
cls = "arrow cherrypick " + (x1<x0 ? "l" : "r");
}else{
drawMergeLine(x0,y0,x1+dx,null);
cls = "arrow merge " + (x1<x0 ? "l" : "r");
}
if( !isCP || p.mu==p.cu ){
dx = x1<x0 ? mLine.w : -(mArrow.w + mLine.w/2);
drawBox(cls,null,x1+dx,y0+(mLine.w-mArrow.h)/2);
}
y1 = y0;
}else{
drawMergeLine(x0,y0,x1+(x0<x1 ? mLine.w : 0),null);
drawMergeLine(x1,y0+mLine.w,null,y1);
|
| ︙ | ︙ |