← Back to team overview

launchpad-dev team mailing list archive

Re: recent improvements for analysing performance issues

 

On 2011-02-28 05:27, Robert Collins wrote:

Thirdly, there is a new test helper I'm landing at the moment -
BrowsesWithQueryLimit. This renders the default view for a page and
checks the query count is under your supplied limit.

Thank you, bearer of good news.

This does raise a question that's been worrying me. It's been about 3 years since I last did serious work on testing page query counts, so maybe I've just forgotten something something basic. But…

…do we know that in real life our request isn't naïvely fetching lots of individual objects by id, ones that in the test are fresh in the cache? Think cases of "foo.bar.zot" where the objects you reference were just created by the test. References like that are generally where the fast but numerous queries come from.

(And to squeeze in one of my hobby horses: it wouldn't be that hard to automate generic prefetching for that case.)


Jeroen



Follow ups

References