title: Array literals causing huge build times in Xcode
body: <p>I have a SwiftUI/SpriteKit game in which each level is described by properties of a tuple in an array literal. There are about 150 tuples so far, with each tuple containing about 20 properties.</p>
  <p>The problem is, this big array literal causes Xcode to build very slowly. It takes something like 5+ minutes to build my project. If I block out the array, the build time is almost instantaneous.</p>
  <p>I think this is due to type inference -- however, I'm explicitly setting the types, like this:</p>
  <pre><code>class MainData: ObservableObject {
      private var levels: [(firstKey: Int, secondKey: String)] = [
          (
             firstKey: 0,
             secondKey: &quot;something&quot;
          ),
          (
             firstKey: 0,
             secondKey: &quot;something&quot;
          )
      ]
  }
  </code></pre>
  <p>Am I doing something wrong? Is there anything I can do to this array to speed up my build times?</p>
  <p>Thank you!</p>
  <p><strong>Update:</strong> After adding some more tuples, Xcode will actually stop responding and my (brand new, desktop) Mac will run out of application memory.</p>