1

When I write down these codes snippets:

import UIKit

class HomeViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {

    var homeCellArr: [Dictionary <String, String>] = [
        ["name": "eee", "pic": "newsIcon"],
        ["name": "dcd", "pic": "taskIcon"],
        ["name": "ccccc", "pic": "cardIcon"],
        ["name": "bbbb", "pic": "mailIcon"],
        ["name": "aa", "pic": "optionIcon"]
    ]
    override func viewDidLoad() {
        ......

I found Building and Indexing became too slow

And CODE Autocomplete also became slow slow slow IN THIS Swift File

Such as I write self. I must wait 6s or 7s, before autocomplete show up

How to fix this problem?


When I noted these codes

 //       var homeCellArr: [Dictionary <String, String>] = [
 //           ["name": "eee", "pic": "newsIcon"],
 //           ["name": "dcd", "pic": "taskIcon"],
 //           ["name": "ccccc", "pic": "cardIcon"],
 //           ["name": "bbbb", "pic": "mailIcon"],
 //           ["name": "aa", "pic": "optionIcon"]
 //       ]

The speed of code autocomplete turn normal

Su Cheung
  • 155
  • 2
  • 11
  • The more Xcode needs to compile the longer it takes. That should only happen the first time compiling after you touched & edited the certain area. It should also not be an issue for your customers as the code is precompiled for the iDevices. – LinusGeffarth Jun 18 '15 at 00:13
  • I can't reproduce the issue. On my machine, your code compiles instantly and autocompletion from `self.` is instant. The trouble may lie elsewhere. (The first thing I would try is quit Xcode and clean the caches...) – matt Jun 18 '15 at 00:34

0 Answers0