From 1223538a60cd1bbb4fe45874865a48ce4456abc4 Mon Sep 17 00:00:00 2001 From: Peter <> Date: Tue, 30 Apr 2019 16:48:12 +0400 Subject: [PATCH] Stats --- Display/TabBarController.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Display/TabBarController.swift b/Display/TabBarController.swift index 42bade03ae..900e286a55 100644 --- a/Display/TabBarController.swift +++ b/Display/TabBarController.swift @@ -163,9 +163,15 @@ open class TabBarController: ViewController { if let validLayout = strongSelf.validLayout { strongSelf.controllers[index].containerLayoutUpdated(validLayout.addedInsets(insets: UIEdgeInsets(top: 0.0, left: 0.0, bottom: 49.0, right: 0.0)), transition: .immediate) } + let startTime = CFAbsoluteTimeGetCurrent() strongSelf.pendingControllerDisposable.set((strongSelf.controllers[index].ready.get() |> deliverOnMainQueue).start(next: { _ in if let strongSelf = self { + let readyTime = CFAbsoluteTimeGetCurrent() - startTime + if readyTime > 0.5 { + print("TabBarController: controller took \(readyTime) to become ready") + } + if strongSelf.selectedIndex == index { if let controller = strongSelf.currentController { if longTap {