File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# GG Changelog
22
3+ ## Unreleased
4+
5+ ### Fixed
6+ - Another memory leak (failure to deregister RAF callbacks).
7+ - Some broken graph rendering (which was relying on the previous leak!).
8+
39## [ 0.35.0] ( releases/tag/v0.35.0 )
410This release is based on Jujutsu 0.35.
511
Original file line number Diff line number Diff line change 7373 });
7474 }
7575
76+ function getKey(row : EnhancedRow | null ) {
77+ if (! row ) return null ;
78+ const lineKeys = row .passingLines .map ((l ) => l .key ).join (" :" );
79+ return ` ${row .revision .id .commit .hex }:${lineKeys } ` ;
80+ }
81+
7682 $ : graphHeight = Math .max (containerHeight , rows .length * rowHeight );
7783 $ : visibleRows = Math .ceil (containerHeight / rowHeight ) + 1 ;
7884 $ : startIndex = Math .floor (Math .max (scrollTop , 0 ) / rowHeight );
8692
8793<svg class ="graph" style ="width: 100%; height: {graphHeight }px;" >
8894 {#each visibleSlice .rows as row , i }
89- {#key row ?. revision . id . commit . hex ?? i }
95+ {#key getKey ( row ) ?? i }
9096 <g transform ="translate( {(row ?.location [0 ] ?? 0 ) * columnWidth } {(row ?.location [1 ] ?? 0 ) * rowHeight })" >
9197 <foreignObject
9298 class:placeholder ={row === null }
104110 {/each }
105111
106112 {#each visibleSlice .rows as row , i }
107- {#key row ?. revision . id . commit . hex ?? i }
113+ {#key getKey ( row ) ?? i }
108114 {#each distinctLines (visibleSlice .keys , row ) as line }
109115 <GraphLine {line } />
110116 {/each }
Original file line number Diff line number Diff line change 2929
3030 onMount (() => {
3131 pollFrame = requestAnimationFrame (pollScroll );
32+ return () => {
33+ if (pollFrame ) cancelAnimationFrame (pollFrame );
34+ };
3235 });
3336
3437 function pollScroll() {
You can’t perform that action at this time.
0 commit comments