File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1259,12 +1259,14 @@ class HomebrewController {
12591259 }
12601260
12611261 func performFullCleanup( ) async throws {
1262- // Run autoremove first to remove orphaned dependencies
1263- let autoremoveArgs = [ " autoremove " ]
1264- _ = try await runBrewCommand ( autoremoveArgs)
1265-
1266- // Then clean up cache and logs directly (same as runCleanup)
1262+ // Fast operation: delete cache and logs to Trash (blocks UI briefly ~50ms)
12671263 try await runCleanup ( )
1264+
1265+ // Slow operation: run brew autoremove in background without blocking UI
1266+ Task . detached ( priority: . background) {
1267+ let autoremoveArgs = [ " autoremove " ]
1268+ _ = try ? await HomebrewController . shared. runBrewCommand ( autoremoveArgs)
1269+ }
12681270 }
12691271
12701272 func getAnalyticsStatus( ) async throws -> Bool {
You can’t perform that action at this time.
0 commit comments