← Back to team overview

harvest-dev team mailing list archive

[Bug 827874] Re: Loading '/' is too expensive

 

A quick check with django debug toolbar tells me:

 - for '/': Total CPU time 264.016 msec (Elapsed time 	399.378 msec) and 5 SQL queries using 30.74ms
 - for '/opportunities': Total CPU time 132.009 msec (Elapsed time: 156.254 msec) and 4 SQL queries using 30.74ms

The most expensive query on the mainpage takes 23.48ms and is:
SELECT COUNT(*) FROM "opportunities_opportunity" INNER JOIN "opportunities_opportunitylist" ON ("opportunities_opportunity"."opportunitylist_id" = "opportunities_opportunitylist"."id") WHERE ("opportunities_opportunity"."valid" = True AND "opportunities_opportunity"."last_updated" = "opportunities_opportunitylist"."last_updated")

As there's no quick fix for making the database schema easier, I suggest
removing this query for now. Is there a clever way for us to cache the
data, so we don't need to query for every single page view?

-- 
You received this bug notification because you are a member of harvest-
dev, which is the registrant for harvest.
https://bugs.launchpad.net/bugs/827874

Title:
  Loading '/' is too expensive

Status in Harvest Service:
  Confirmed

Bug description:
  Loading '/' is too expensive. The machine is getting more and more
  unhappy and this causes problems for summit, loco directory and other
  pages.

To manage notifications about this bug go to:
https://bugs.launchpad.net/harvest/+bug/827874/+subscriptions


Follow ups

References