macOS 13.6 AppKit performance optimization When Using NSSplitView with Auto Layout
I've been working on this all day and I'm deploying to production and I've been working with `NSSplitView` in macOS 13.6 for a project that requires dynamic resizing of its subviews, but I'm working with important performance optimization. The UI becomes sluggish and unresponsive when I drag the divider handles. I've implemented `NSLayoutConstraint` for my layout, but it seems like the layout pass takes too long, especially with a complex view hierarchy. Here's a snippet of how I'm setting up my `NSSplitView`: ```swift class MySplitViewController: NSSplitViewController { override func viewDidLoad() { super.viewDidLoad() self.splitView.autosaveName = "mySplitView" self.splitView.delegate = self } func splitView(_ splitView: NSSplitView, canCollapseSubviewAt dividerIndex: Int) -> Bool { return true } } ``` My main view controller contains a few subviews like `NSTableView` and `NSCollectionView`, and I've set them up using Auto Layout. However, during resizing, I see the following behavior in the console: ``` [LayoutConstraints] Unable to simultaneously satisfy constraints. Supporting constraints will be broken. ``` I've tried adjusting the priority of my constraints and even disabling Autolayout for the split view, but nothing seems to alleviate the question. I've also verified that all my views are properly laid out before the split view resizing occurs by calling `layoutSubtreeIfNeeded()`, but thereβs still noticeable stutter. Does anyone have insights into optimizing the performance of `NSSplitView` when using Auto Layout? Are there specific constraints or layout strategies that work better in this scenario? Thanks in advance! What would be the recommended way to handle this?