Private method takes an abnormal amount of time to compile
| Originator: | GriotSpeak | ||
| Number: | rdar://24250169 | Date Originated: | 19-Jan-2016 08:36 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 7.2 (7C68) |
| Classification: | Performance | Reproducible: | Always |
Summary:
A single method takes 75+ seconds to compile
Steps to Reproduce:
Open the provided project and build. Check the log for build times which have been enabled via `OTHER_SWIFT_FLAGS = -Xfrontend -debug-time-function-bodies`
Expected Results:
Expression is too complex warning or faster compilation? I don’t know, actually. If there is something horrible that I am doing, I would like a diagnostic to tell me as much.
Actual Results:
Stultifying compilation times.
Regression:
It has been this way for months, I only just found a flag to locate the problem method.
Notes:
from the build log…
8.0ms /Users/tj/Development/SolfegeInput/SolfegeInput/Source/Control.swift:323:18 private func generateConstraintsForCurrentLayout() -> [NSLayoutConstraint]
0.2ms /Users/tj/Development/SolfegeInput/SolfegeInput/Source/Control.swift:326:63 get {}
0.3ms /Users/tj/Development/SolfegeInput/SolfegeInput/Source/Control.swift:335:18 private func _createCenterConstraints(syllableControl syllableControl: Control.Button, buffer: UIView, centerAttribute: NSLayoutAttribute) -> [NSLayoutConstraint]
250.3ms /Users/tj/Development/SolfegeInput/SolfegeInput/Source/Control.swift:368:54 (closure)
15.4ms /Users/tj/Development/SolfegeInput/SolfegeInput/Source/Control.swift:396:81 (closure)
79977.7ms /Users/tj/Development/SolfegeInput/SolfegeInput/Source/Control.swift:345:18 private func naturalRowConstraints() -> [NSLayoutConstraint]
35.3ms /Users/tj/Development/SolfegeInput/SolfegeInput/Source/Control.swift:414:18 private func naturalRowBufferConstraints() -> [NSLayoutConstraint]
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!