mercredi 1 avril 2015

Ruby on rails : Best method / approach [on hold]



  1. find_each is better than instead of all.each


    find_each() method works in batches of 1000. This means that if I have thousands of records in my database,find_each() will load into memory only 1000 at a time, instead of loading them all at once and possibly overwhelming the server.




  2. Sidekiq is supposed to perform better than resque.




what else?


Aucun commentaire:

Enregistrer un commentaire