Closed smallgirl closed 9 months ago
AF.request("https://api.wogg.xyz/") .responseString(queue: .global(qos: .background), encoding: .utf8) { [weak self] response in guard let strongSelf = self else { return } switch response.result { case let .success(data): do { print("parse----start") let doc: Document = try SwiftSoup.parse(data) print("parse----finish") } catch { logVerbose(error) } case let .failure(error): logVerbose(error) } }
It took 7 seconds from start to finish of parsing
线程问题,切换一个线程就快了。
It took 7 seconds from start to finish of parsing