         return filters.reduce(true, { return $0.0 && $0.1.isEmpty })
     }
     
+    fileprivate lazy var searchQueue: DispatchQueue = DispatchQueue(label: "Search", qos: .userInteractive)
+    
     fileprivate func updateSearchResults(for controller: SessionsTableViewController, with filters: [FilterType]) {
         guard !isAllEmpty(filters) else {
             controller.searchResults = nil


import Cocoa
import ConfCore

enum FilterIdentifier: String {
    case text

            print(predicate)
        #endif
        
        searchQueue.async { [unowned self] in
            do {
                let realm = try Realm(configuration: self.storage.realmConfig)
                
                let results = realm.objects(Session.self).filter(predicate)
                let keys: [String] = results.map({ $0.identifier })
                
                DispatchQueue.main.async {
                    let searchResults = self.storage.realm.objects(Session.self).filter("identifier IN %@", keys)
                    controller.searchResults = searchResults
                }
            } catch {
                LoggingHelper.registerError(error, info: ["when": "Searching"])
            }
        }
    }
    
}
