Xcode6.4 (6E35b): @IBDesignable view with @IBInspectable properties causes excessive CPU load even when storyboard is open behind the current tab
| Originator: | benchatelain | ||
| Number: | rdar://21772452 | Date Originated: | 10-Jul-2015 02:24 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode6.4 (6E35b) |
| Classification: | Performance | Reproducible: | Always |
Summary: Viewing an @IBDesignable view in IB causes Xcode to consume pretty much all available CPU resources. It does this with a relatively low priority as there is minimal lag on a modern MacBook Pro. What’s unexpected is that this CPU consumption continues even if the @IBDesignable view is hidden by another tab. Steps to Reproduce: 1. Create an iOS app project 2. Add two or more storyboards to the project 3. Create a UIView subclass in swift, mark it @IBDesignable and add a few @IBInspectable properties 4. Use the new @IBDesignable UIView in a storyboard 5. View the storyboard scene that contains the @IBDesignable class in IB 6. Notice the CPU usage peak 7. Open a new Xcode tab in front of the one with IB 8. Navigate to a source code file in the new tab Expected Results: Since the tab displaying the @IBDesignable view in IB is hidden behind another tab, the CPU activity is expected to return to normal. Actual Results: The CPU stays at near 100% across all cores, even if the Mac’s screen is put to sleep. Notes: Note that switching the IB tab to a storyboard that does not contain an @IBDesignable view immediately quiets the CPU, whether this tab is visible or not.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!