On Tue, Mar 26, 2013 at 5:48 PM, larry google groups < lawrencecloj...@gmail.com> wrote:
> > > I'd guess that this would be a pretty big map to run to over 64k though > - though > > I think Clojure has a single initialiser method that initialises all > vars in the > > namespace, so it is tha total that is important. > > > It certainly seems as if it is the whole namespace that is being compiled. > The startup file was fine for a while, when I had maybe 3k or 4k of data > that I was holding in a map, which told the software about the different > types of data it needed to work on. But then my company gave me a list of > all search node numbers that we have used to structure the way we make > calls to Solr. The most obvious place for me to put this was in that same > map, so I could use it to build search queries on the fly, but, as I said, > I then ran into the 64k limit. > > I guess, moving forward, I will store the data in MongoDb and I will read > into that var once the app is running. > Yeah, top-level defs get compiled into a *<namespace>__init.class* class - you can verify this by AOT compiling then using *javap -c* on the class file. Something like: (def config (read (clojure.java.io/resource "my_file.clj"))) will overcome the limitation -- Dave -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.