launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #02667
Reducing query logs in local testing
I like LP_DEBUG_SQL_EXTRA for performance analysis. An oops tells you a
page spends too much time on one kind of query; you "env
LP_DEBUG_SQL_EXTRA make run"; you load the page; and you look up
instances of the query in the run's stderr output. Now you know where
the query comes from.
There's one thing that makes this painful: the query log is crammed with
framework housekeeping that drowns out the stuff you're looking for.
So it may be worthwhile to reduce repetitiveness in these queries, not
for performance but to make our performance analysis more effective.
A few things get repeated over and over again. Based on my highly
scientific, representative sample of 1 page:
(1) getPrincipal: 39% of queries.
(2) _getBetaRedirectionView: 24% of queries.
(3) set_developer_in_launchbag_before_traversal: 13% of queries.
Are these things we could cut down on somehow during "make run"? I'm
guessing a lot of the repetition is caused by images and such being
handled differently on production.
Jeroen
Follow ups