With about 50 options and factors posted, the page with my decision about whether to work on the site instead of the Ph.D. was making more than 7,000 SQL queries. It was taking about 7 seconds to load—yikes!
It turns out that Django’s caching of query results didn’t work the way I thought. So I spent the last week restructuring the code, and did an all-nighter last night. Got it down to 120 SQL queries, and a passably fast site. Whew! (With a little more work, it could be way faster than that, even.)