On Fri, Oct 7, 2011 at 4:20 PM, Stuart Halloway <stuart.hallo...@gmail.com> wrote: >> Trying to be a little bit constructive here, in case I come across as >> complaining, I took the source for c.d.json and put it into a >> leiningen project, enabled warn on reflection, and found that several >> cases of (... (let [c (char i] ... (= c \x) ...) results in Clojure >> deciding it needs to perform reflection in order to call equals in the >> comparison with a fixed character. I'm not really sure what the proper >> solution for this is, but I changed the "let" to (let [c >> (Character/valueOf (char i)] ...) and the time for my 217KB JSON file >> dropped from 107 seconds to 2 seconds, or only a little more than >> twice as slow as clj-json (which clocked in a little under one second >> for my file). >> >> Lars Nilsson > > This reflection warning can be fixed with an enhancement on the > Clojure side, which I have just pushed to master [1]. > > I would like to create 1.4 alpha 1 with the code changes that have > gone in today. It would be super-great if anybody has time to build > your own project against master and let us know if you see any issues. > > Thanks, > Stu > > [1] > https://github.com/clojure/clojure/commit/405d24dd49d649c01b7881f1394fc90924c54ef0
Cloning and building 1.4.0-master-SNAPSHOT resulted in much better performance in loading data into couchdb. When using c.d.json it takes about 98 seconds for loading and storing 100 JSON documents (ranging in size from some tens of KB, to 5MB), while clj-json takes about 86 seconds. Comparing just the load time c.d.json takes 27 seconds and clj-json takes 12 seconds. Overall, the 100 JSON files are about 114MB. So to keep things in perspectice, a single 217KB file took over 100 seconds before this change, now 114MB takes 27 seconds. Lars Nilsson -- 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