Skip to content

Commit c713403

Browse files
committed
perf(studio): shorten the one-lane check's comment
1 parent 778762d commit c713403

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎packages/studio/src/player/components/timelineZones.ts‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,8 @@ function byStableId(a: TimelineElement, b: TimelineElement): number {
3636
return ka < kb ? -1 : ka > kb ? 1 : 0;
3737
}
3838

39-
/**
40-
* Whether first-fit would put every clip on the first lane: no two clips overlap except a transition
41-
* pair. A sweep in start order visits only the pairs that overlap, so a long sequential track costs
42-
* one sort, where first-fit compares each clip with every clip already placed.
43-
*/
39+
/** True when no two clips overlap except a transition pair.
40+
* A start-order sweep costs one sort, not first-fit's all-pairs compare. */
4441
function sharesOneLane(clips: TimelineElement[]): boolean {
4542
const byStart = [...clips].sort((a, b) => a.start - b.start);
4643
for (let i = 0; i < byStart.length; i++) {

0 commit comments

Comments
 (0)