Yelp/Testify — pull request #57 by ayust (2012-03-24 01:51:42+00:00)
Title: Pre-cache all already-known tests ahead of time to save DB round-trips

Currently when reporting a test, we do a db round-trip to look up the ID of the test so that we can insert a result row. This adds at least a few ms to each test time (and possibly more, if the DB round-trip time is higher).

This patch makes it so that we grab all known test IDs in a single round-trip at the start. Since in general, most test runs are going to run almost every known test, we don't wind fetching much more total data (relative to fetching it piecewise), and we only have to deal with DB latency once (for this particular task) rather than N times.