Skip to content

Commit 71f881c

Browse files
authored
[Collections] Remove VACUUM (#3866)
`VACUUM` causes more problems than benefits, so removing it. rdar://85368153
1 parent 09021ce commit 71f881c

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

Sources/PackageCollections/Storage/SQLitePackageCollectionsStorage.swift

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -789,19 +789,6 @@ final class SQLitePackageCollectionsStorage: PackageCollectionsStorage, Closable
789789
try statement.step()
790790
}
791791

792-
// Run VACUUM asynchronously since it's just an optimization measure and could take some time to complete.
793-
// Add a delay since VACUUM often fails if run immediately after the deletions.
794-
DispatchQueue.sharedConcurrent.asyncAfter(deadline: .now() + 0.5) {
795-
// Repack database file to reduce size (rdar://77077510)
796-
do {
797-
try self.withDB { db in
798-
try db.exec(query: "VACUUM;")
799-
}
800-
} catch {
801-
self.observabilityScope.emit(info: "Failed to 'VACUUM' the database: \(error)")
802-
}
803-
}
804-
805792
self.targetTrie.remove { $0.collection == identifier }
806793
}
807794

0 commit comments

Comments
 (0)