From 0b84ecaf7ba0fb2cd3f3867da8dc732450b55b50 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Mon, 13 Apr 2026 13:35:03 -0500 Subject: perf: cache filtered collections and add equatable row views MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convert filteredJobs, filteredPastes, and filteredTickets from computed properties to stored properties updated via didSet on their inputs. Each update function guards with an equality check before assigning, so @Observable skips the notification when the filtered result hasn't changed — preventing list re-renders on auto-refresh when no visible data has actually changed. Add Equatable conformance to BuildRowView, PasteRowView, TicketRowView, and SelectableTicketRow, and apply .equatable() at each ForEach call site. When a list does re-render, SwiftUI now skips body evaluation for rows whose model value is identical to the previous pass. Implements: https://todo.sr.ht/~ccleberg/hutch/57 --- Hutch/Views/Builds/BuildRowView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Hutch/Views/Builds/BuildRowView.swift') diff --git a/Hutch/Views/Builds/BuildRowView.swift b/Hutch/Views/Builds/BuildRowView.swift index 9602e5c..a490123 100644 --- a/Hutch/Views/Builds/BuildRowView.swift +++ b/Hutch/Views/Builds/BuildRowView.swift @@ -1,6 +1,6 @@ import SwiftUI -struct BuildRowView: View { +struct BuildRowView: View, Equatable { let job: JobSummary var body: some View { -- cgit v1.2.3