Skip to content
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export class TraceAnchoredNetLabelOverlapSolver extends BaseSolver {

private activeSearch: ActiveOverlapSearch | null = null
private skippedOverlapKeys = new Set<string>()
private labelEligibilityByIndex: Array<boolean | undefined> = []

constructor(params: TraceAnchoredNetLabelOverlapSolverParams) {
super()
Expand Down Expand Up @@ -98,7 +99,12 @@ export class TraceAnchoredNetLabelOverlapSolver extends BaseSolver {
}

private isLabelEligible(labelIndex: number) {
return this.getTraceLocationsForLabel(labelIndex).length > 0
const existingEligibility = this.labelEligibilityByIndex[labelIndex]
if (existingEligibility !== undefined) return existingEligibility

const isEligible = this.getTraceLocationsForLabel(labelIndex).length > 0
this.labelEligibilityByIndex[labelIndex] = isEligible
return isEligible
}

private labelsOverlap(overlap: LabelOverlap) {
Expand Down
Loading
Loading