Displaying 1 result from an estimated 1 matches for "36786ms".
Did you mean:
367860
2012 Jan 27
2
to_json performance
...ess to say I''m using and requiring `yajl-ruby`, so I''m pretty
confident that MultiJson will pick it up as my engine, and in fact it
is:
1.9.3p0 :001 > MultiJson.engine
=> MultiJson::Engines::Yajl
The key issue here is that with a large Hash the render action takes
36786ms to finish ( of which 8253.6ms spent for the database query,
that high because of multiple ORDER BY, that''s another matter).
So I tried another way:
render text: Yajl::Encoder.encode(my_hash)
Using `Yajl::Encoder.encode`(or `MultiJson.encode`for that matter)
yields another kind of re...