If you want json to be fast in Ruby, chances are you might want to look at <a href="https://github.com/ohler55/oj" rel="nofollow">https://github.com/ohler55/oj</a><p>Not sure how easy it is to jam oj into either of these two serializers though.<p>EDIT: rabl seems to support it according to the webpage
I've had the exact same experience. Rabl is horribly slow in template generation...<p>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.<p>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<p>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. <a href="https://github.com/apotonick/roar-rails" rel="nofollow">https://github.com/apotonick/roar-rails</a><p>Plus, it's the only system which will de-serialize the data using the representer. Boom-shaka-laka.
AMS maintainer (though admittedly doing a poor job of it lately :/) here.<p>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.<p>Also, AMS has a caching feature (that is being re-written, too) that'd make for an interesting benchmark.
No mention of jbuilder? When I looked at the popularity of json generators it seemed to be the most popular one, but now it occurred to me that it may be because it's included by default in Rails.