Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions ui/src/components/tracks/base_slice_track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {assertExists} from '../../base/logging';
import {clamp, floatEqual} from '../../base/math_utils';
import {cropText} from '../../base/string_utils';
import {Time, time} from '../../base/time';
import {exists} from '../../base/utils';
import {uuidv4Sql} from '../../base/uuid';
import {featureFlags} from '../../core/feature_flags';
import {raf} from '../../core/raf_scheduler';
Expand Down Expand Up @@ -110,15 +109,6 @@ function filterVisibleSlices<S extends Slice>(
// by timestamp you can binary search for the last slice such
// that slice.start <= end.

// One specific edge case that will come up often is when:
// For all slice in slices: slice.startNsQ > end (e.g. all slices are
// to the right).
// Since the slices are sorted by startS we can check this easily:
const maybeFirstSlice: S | undefined = slices[0];
if (exists(maybeFirstSlice) && maybeFirstSlice.startNs > end) {
return [];
}

return slices.filter((slice) => slice.startNs <= end && slice.endNs >= start);
}

Expand Down