Benchmarking JSON Generation in Ruby
techblog.thescore.com
techblog.thescore.com
Not sure how easy it is to jam oj into either of these two serializers though.
EDIT: rabl seems to support it according to the webpage
edit: although not sure it's being used properly yet
Having said that, it would still be nice to see the best performance we can get out of the 3 tools we're benchmarking. But, we need to get Oj working with all 3 of them in order to avoid unfair comparison of performance.
Also, FWIW-- older versions of AMS, with caching, are a total crapshoot due to marshal dumping the objects into the cache and re-serializing them to JSON each time. Much better to cache the response itself instead of the objects making up the response.
Granted the caching feature was yanked out of AMS, but pretty painful for those of us that actually tried using it. Carrierwave + AMS caching = Problemzilla
At this point, we too have had Rabl, AMS, and Representers and the best one of the lot-- by far, for our use cases has been: Roar. https://github.com/apotonick/roar-rails
Plus, it's the only system which will de-serialize the data using the representer. Boom-shaka-laka.
Which version were you benchmarking? The in-alpha 0.9 was a total re-write, so it'd be interesting to see how it compares.
Also, AMS has a caching feature (that is being re-written, too) that'd make for an interesting benchmark.
By the way, I would really appreciate it if you can answer this as you're in a better position to do so: http://techblog.thescore.com/benchmarking-json-generation-in...
Some of us are getting concerned...