Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMINJI KIM
1,905 PointsSwift compile time is too long
hi, I'm the newbie trying to learn Swift from the scratch. WHenever I type the new codes, the Swift takes at least 2 seconds just to go through a few lines of simple code for example, the code below takes 2-3 seconds. I'm not sure how to explain, but the top bar where it says "Ready" changes to loading sign for 2 seconds. It is normal to take this long ?
// Swift Functions
func calculateArea(length: Int, width: Int) -> Int { let area = length * width return area } // Room 1 let areaOfRoom1 = calculateArea(15, width: 22) areaOfRoom1 // Room 2 calculateArea(12, width: 15)
func someFunction() {
}
1 Answer
Jason Anders
Treehouse Moderator 145,860 PointsI've noticed that sometimes too with my Xcode. I think it probably has something to do with memory and processing capability of my iMac.
I have noticed, however, that the longer I have Xcode open and am working in it, the faster is does get. I usually start off at a few seconds to longer in the very beginning, but later on, it's a fraction of a second.