LoginSignup
16
16

More than 5 years have passed since last update.

Xcode6.2でビルドが異常に遅い

Posted at

ビルドが異常に遅いので調べてみました。Xcodeに含まれるバグ?があるようで下記の方法で解決できそうです。

環境

・CocoaPodsあり
・Xcode 6.2

やったこと1→結果:改善せず

(※削除するものはバックアップしましょう。)

  • ~/Library/Developer/Xcode/DerivedDataの中をすべて削除
  • プロジェクト内のPodsをディレクトリごと削除
  • プロジェクト内のmyAppName.xcworkspaceを削除
  • ターミナルからプロジェクトディレクトリで再度pod installを実行

やったこと2 →結果:ほぼ改善

    func dumy(json:JSON) -> NSDictionary {
        return [
            "1" : json["1"].int!,
            "2" : json["2"].string!,
            "3" : json["3"].int!,
            "4" : json["4"].string!
        ]
    }

こんなようなものがあったので、
↓こうしたら概ね良くなりました。

    func dumy(json:JSON) -> NSDictionary {
        var result = NSMutableDictionary()
        result["1"] = json["1"].int!
        result["2"] = json["2"].string!
        result["3"] = json["3"].int!
        result["4"] = json["4"].string!
        return result
    }

Stack OverFlowにもかかれていますが、[]での書き方がなにかindexing周りでおかしなことになるような。。。よく分かりません。

「やったこと1」で改善する人もいるようなので、それはまた別症状なんだろうな。

参照
http://stackoverflow.com/questions/26494082/swift-xcode-index-freezing-or-slow
http://stackoverflow.com/questions/25537614/why-is-swift-compile-time-so-slow

16
16
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
16