On Tue, Feb 7, 2012 at 4:14 PM, Micah Alcorn <ad
...@micahalcorn.com> wrote:
> I have two applications where JSON is rendered by a Rails API for use
> on a mobile client. Both apps use CarrierWave 0.5.8 with Rails 3.1+
> and Fog to connect to Rackspace Cloud Files. One uses mongoid and the
> other activerecord.
> In both cases, if my controller retrieves an array and renders HTML,
> there is no problem. But if I render JSON and the model includes a CW
> attachment, the rendering is exponentially slower. For example, my
> User has many Photos, each containing an Image (CW). If
> @current_user.photos.count == 13, then the Rails default JSON render
> will take about ninety (90) seconds! Rendering HTML might take three
> (3) seconds.
> However, if I use json_builder and do not include Image object, then
> JSON rendering takes approximately the same amount of time as HTML.
> Then I have to reconstruct the Image urls manually on the client side,
> which is don't think is a good long term solution.
> Is this normal, or am I missing something? Thanks!
> --
> You received this message because you are subscribed to the Google Groups
> "carrierwave" group.
> To post to this group, send email to carrierwave@googlegroups.com.
> To unsubscribe from this group, send email to
> carrierwave+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/carrierwave?hl=en.