Currently this takes ~1200ms to run per record, which times out on Heroku after roughly 20 items, whereas I have 1800 in the database.