title: (Scala) How to create large hardcoded collections (~2000 objects)
body: <p>I have some data which I'd like to model using two immutable.Maps with each having ~50 vectors and each of those vectors having ~20 objects (each of them holds a few integers and a few short strings), totaling ~2000 objects.</p>
  
  <p>I won't be adding or deleting anything from those data, but I'll be querying those a lot with maps and filters (I'm writing a play server). Since there is no worry for data integrity from bad writes, and seeing the data set is not that big, I figured I would just use scala collections instead of some external database.</p>
  
  <p>I took the most straightforward path: I just wrote two huge hard-coded Maps in a source file. The size of the file (only containing the object with two Maps) was about 350k. Ensime didn't warn me of any errors, so it wasn't until I ran <code>sbt compile</code> when I got the error message <code>Could not write class mypackage/myBigListOfStuffs$ because it exceeds JVM code size limits. Method scala/package$'s code too large!</code></p>
  
  <p>What would be the quickest way to workaround this limitation?
  Startup time doesn't matter since this is going to be a server, and I would like the method to be without too much hassle.</p>
  
  <p>Thanks in advance!</p>