vendredi 24 avril 2015

Active Admin: Large page load time due to huge data in the database tables

I am using activeadmin gem with Rails 3.2 and Ruby 1.9.3. I have a filter which is a dropdown like:

filter :product_id, label: 'Product Id',as: :select, collection: proc{Product.pluck(:id)}

The problem is that the page takes a lot of time to load (Around 11s). I assume this is because of the huge size of the Product table.

Is there a way I can reduce this page-load time? I was thinking of using a ajax call to populate the dropdown. However I am not able to find a way to do so on a activeadmin filter. Kindly suggest.

Aucun commentaire:

Enregistrer un commentaire