Good afternoon friends!
I have very strange results when loading Nib files. Here is the TimeProfiler screen:

In general, it sometimes takes more than 1200 ms to load a simple two-point viewController. The threads are very simple. Here is an example. As you can see from the screenshot above, it takes 311 ms to download:

The code I use to download nibs is:
required init(coder aDecoder: NSCoder) { super.init(coder: aDecoder) setupXib() } func setupXib() { NSBundle.mainBundle().loadNibNamed("TimeSaver", owner: self, options: nil) bounds = view.bounds addSubview(view) setup() } func setup() { slider.maximumValue = 30.0 slider.minimumValue = 1.0 slider.value = 5.0 timeLabel.text = "\(sliderValue.format(format)) min" }
I do not know if this can cause a problem, but this application uses application groups (for WatchExtension). As you can see, I am calling nibs from mainBundle, since they are all in the main target. Maybe this is the reason?
Thanks!
source share