added log for slow db

This commit is contained in:
Mikhail Filimonov 2024-03-14 09:06:54 +03:00
parent 5bbd363fca
commit 4b7cbbea32

View File

@ -2999,15 +2999,6 @@ final class PostboxImpl {
let startTime = CFAbsoluteTimeGetCurrent()
#if os(macOS)
#if DEBUG || BETA
var crashDisposable: Disposable?
crashDisposable = (Signal<Void, NoError>.single(Void())
|> delay(0.1, queue: .concurrentDefaultQueue())).startStandalone(next: { _ in
preconditionFailure()
})
#endif
#endif
self.valueBox.begin()
let transaction = Transaction(queue: self.queue, postbox: self)
@ -3023,11 +3014,6 @@ final class PostboxImpl {
postboxLog("Postbox transaction took \(transactionDuration * 1000.0) ms, from: \(file), on:\(line)")
}
#if os(macOS)
#if DEBUG || BETA
crashDisposable?.dispose()
#endif
#endif
let _ = self.isInTransaction.swap(false)