Skip to content
Open
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
3 changes: 1 addition & 2 deletions Sources/Cacheout/Views/MenuBarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,8 @@ struct MenuBarView: View {
// MARK: - Top Categories

private var topCategories: some View {
// ⚑ Bolt: Chain .lazy before .filter and .sorted to avoid intermediate array allocation
// ⚑ Bolt: Filter eagerly before sorting, as sorting forces full array materialization
let top = viewModel.scanResults
.lazy
.filter { !$0.isEmpty }
.sorted { $0.sizeBytes > $1.sizeBytes }
.prefix(5)
Expand Down
Loading