I sped up the rails seed_data rake task considerably by paralleling some things. I also added a counter_cache to all the imageable models so we can easily check a model to see if it has any images and avoid doing an unnecessary table join with the images table if there are no images to be found. I'll have to reset the counters in production once this deploys but that's no biggie.
I sped up the
rails seed_data
rake task considerably by paralleling some things. I also added acounter_cache
to all theimageable
models so we can easily check a model to see if it has any images and avoid doing an unnecessary table join with the images table if there are no images to be found. I'll have to reset the counters in production once this deploys but that's no biggie.Gotta get back on the horse!