Go to content

RailsConf 2022 - Your test suite is making too many database calls! by Joël Quenneville

On a recent project, I sped up a test suite 15% by making a change to a single factory. This suite, like many others (including yours!), was making way too many database calls. It’s so easy to accidentally add extra queries to factories and test setup and these can compound to shockingly large numbers. The chaos is your opportunity! Learn to profile and fix hot spots, build big-picture understanding through diagrams, and write code that is resistant to extraneous queries. This talk will equip you to take back control of your build times and maybe impress your teammates in the process. _____________________________________________________________ Cloud 66 - Deploy your Rails code directly from your repo to any cloud in minutes. Cloud 66 offers the convenience of Heroku, but on any cloud and in any region, with persistent storage, custom network configuration, zero downtime deployments, blue/green and canary releases, WAF, and more. Get $100 Cloud 66 Free Credits with the code: RailsConf2022 ($100 Cloud 66 Free Credits, for the new user only, valid till 31st December 2022) Cloud 66: https://cloud66.com/frameworks/rails?utm_source=e&utm_medium=d&utm_campaign=ytRailsConf-22

May 17, 2022