diff --git a/EnumWindows/BrowserApplication.swift b/EnumWindows/BrowserApplication.swift index 2070154..9901252 100644 --- a/EnumWindows/BrowserApplication.swift +++ b/EnumWindows/BrowserApplication.swift @@ -54,10 +54,6 @@ class BrowserTab : BrowserNamedEntity, Searchable, ProcessNameProtocol { } var title : String { - return self.titleInternal.count > 0 ? self.titleInternal : self.url - } - - var titleInternal : String { /* Safari uses 'name' as the tab title, while most of the browsers have 'title' there */ if self.rawItem.responds(to: Selector("name")) { return performSelectorByName(name: "name", defaultValue: "") diff --git a/EnumWindows/main.swift b/EnumWindows/main.swift index 4a12b73..6a21b20 100644 --- a/EnumWindows/main.swift +++ b/EnumWindows/main.swift @@ -62,6 +62,21 @@ func handleCatalinaScreenRecordingPermission() { handleCatalinaScreenRecordingPermission() +/* + a naive perf test, decided to keep it here for convenience + +let start = DispatchTime.now() // <<<<<<<<<< Start time + +for _ in 0...100 { + search(query: "pull", onlyTabs: false) +} +let end = DispatchTime.now() // <<<<<<<<<< end time +let nanoTime = end.uptimeNanoseconds - start.uptimeNanoseconds // <<<<< Difference in nano seconds (UInt64) +let timeInterval = Double(nanoTime) / 1_000_000_000 // Technically could overflow for long running tests + +print("TIME SPENT: \(timeInterval)") +*/ + for command in CommandLine.commands() { switch command { case let searchCommand as SearchCommand: