timeout on DistributionSourcePackage:+changelog

Bug #607954 reported by Robert Collins
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
William Grant

Bug Description

OOPS-1900C772 https://launchpad.net/ubuntu/+source/glib2.0/+changelog
1 127 3983 31 3952 SQL-launchpad-main-slave
SELECT LibraryFileAlias.content,
       LibraryFileAlias.date_created,
       LibraryFileAlias.expires,
       LibraryFileAlias.filename,
       LibraryFileAlias.hits,
       LibraryFileAlias.id,
       LibraryFileAlias.last_accessed,
       LibraryFileAlias.mimetype,
       LibraryFileAlias.restricted
FROM LibraryFileAlias
WHERE LibraryFileAlias.id = $INTLIMIT $INT
2 125 809 6 803 SQL-launchpad-main-slave
SELECT LibraryFileContent.datecreated,
       LibraryFileContent.filesize,
       LibraryFileContent.id,
       LibraryFileContent.md5,
       LibraryFileContent.sha1
FROM LibraryFileContent
WHERE LibraryFileContent.id = $INTLIMIT $INT

Related branches

Revision history for this message
Julian Edwards (julian-edwards) wrote :

This page already had lots of love - changelog used to be on the DSP index but I moved it out as it's very costly to render. However, the distro guys insist on keeping the whole changelog on a single page so that they can use ctrl-f in the browser to search for stuff.

So, we need to make it searchable somehow before we can do anything about this.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Having said that, I'm surprised it's using so much SQL time. Most of the slowness should be in rendering the huge page.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Ah, it's because it's issuing hundreds of queries trying to linkify bug numbers and email addresses. This is extremely hard to fix because the changelog is not a single file, but rather lots of entries from all the sourcepackagerelease rows, which makes it harder to collate all the bug numbers / email addresses and issue a mass query.

Revision history for this message
William Grant (wgrant) wrote :

Why does it need to make a query for each bug number? I thought we stopped putting the summary in a tooltip.

Revision history for this message
Julian Edwards (julian-edwards) wrote : Re: [Bug 607954] Re: timeout on DistributionSourcePackage:+changelog

On Wednesday 21 July 2010 12:25:04 you wrote:
> Why does it need to make a query for each bug number? I thought we
> stopped putting the summary in a tooltip.

So if it knows if the bug is a valid number before linking. We could just
link blindly but that has the potential to raise the OOPS count.

Revision history for this message
Robert Collins (lifeless) wrote :

That seems pretty trivial:
1) gather all the bug numbers we want to check
2) do a single query checking which ones exist
3) linkify to the /bugs/XXX links.

Likewise people.

Or am I missing something?

-Rob

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Yes :)

The way the page is rendered makes that hard as it loops over all the SPRs in tal (to repeat each rendered section for each SPR).

Revision history for this message
Robert Collins (lifeless) wrote :

Ugh. Ok, so:
a view that gets all the sprs and DTRT
talk talks to the view
?

Revision history for this message
Julian Edwards (julian-edwards) wrote :

On Wednesday 21 July 2010 19:52:29 you wrote:
> Ugh. Ok, so:
> a view that gets all the sprs and DTRT
> talk talks to the view
> ?

I'm sure something can be done, it's just not as trivial as some query
optimisations... :(

tags: added: pg83
removed: oops
Changed in launchpad:
importance: High → Critical
Revision history for this message
Micah Gersten (micahg) wrote :

Just got one of firefox:
OOPS-1857D776
https://launchpad.net/ubuntu/+source/firefox/+changelog

tags: removed: pg83
description: updated
description: updated
description: updated
description: updated
William Grant (wgrant)
Changed in launchpad:
assignee: nobody → William Grant (wgrant)
status: Triaged → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
Changed in launchpad:
milestone: none → 11.04
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Revision history for this message
Robert Collins (lifeless) wrote :
Revision history for this message
Robert Collins (lifeless) wrote :

OOPS-1901QS219

Revision history for this message
Robert Collins (lifeless) wrote :

Rendered third time - 91 queries/external actions issued in 4.61 seconds. So it can perform ok, but we've plenty of room to improve.

tags: added: qa-ok
removed: qa-needstesting
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.