lundi 6 juillet 2015

Is Rails really slow? Completed 200 OK in 4121ms (Views: 2973.2ms | ActiveRecord: 59.9ms) [on hold]

I have an action that looks like this:

def action    
  render json: {listings:Listing.where(deleted:false), users:User.all}
end

The server outputs this:

Completed 200 OK in 4121ms (Views: 2973.2ms | ActiveRecord: 59.9ms)

I'm building a Rails App that pulls data from a database and returns a json. There are no images or views to be rendered. Why is the "Views" above almost 3 seconds?

This makes me wonder Rails is really slow and has terrible performance. I tried doing config.cache_classes = true in my environments/development.rb but it didn't change anything. Thanks!

Aucun commentaire:

Enregistrer un commentaire