I just updated my Xcode form from 6.3 to 7.1 and therefore also my project from Swift 1.2 to Swift 2.
Everything seems to work, except that my application starts up 6 seconds slower than before.
I traced the problem with this class initializer:
class TextPreviewAdapter { private let themeProvider: ThemeProvider private let containerView: UIView private let previewText: UITextView private let carretView: UIView private var carretTextPosition: UITextPosition? init(themeProvider: ThemeProvider) { self.themeProvider = themeProvider containerView = UIView() let time = CACurrentMediaTime() previewText = UITextView() print("TextPreviewAdapter \(CACurrentMediaTime() - time)") carretView = UIView() }
Print Call Output
TextPreviewAdapter 5.86848595833144
The time changes every time I start Xcode.
Application - keyboard extension. This may not be the only performance issue related to migration. The whole application looks messy, in some roles the animations are slow, sometimes the fast manipulator is not processed ... None of this happened before the migration.
In the output, I have suspicious logs (also not present before the transfer):
2015-10-23 00:39:55.591 ProductName Keyboard[3293:300203] _BSMachError: (os/kern) invalid capability (20) 2015-10-23 00:39:55.592 ProductName Keyboard[3293:300203] _BSMachError: (os/kern) invalid name (15) 2015-10-23 00:39:55.593 ProductName Keyboard[3293:300203] _BSMachError: (os/kern) invalid capability (20) 2015-10-23 00:39:55.593 ProductName Keyboard[3293:300203] _BSMachError: (os/kern) invalid name (15) 2015-10-23 00:45:02.532 ProductName Keyboard[3293:300964] host connection <NSXPCConnection: 0x147e459c0> connection from pid 3292 invalidated
Has anyone had the same problem? Any ideas on how to solve these problems?
source share