Front page could be faster
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Low
|
Unassigned |
Bug Description
I'm having a look at the performance of the front page. It just took 5,331ms to render, 4,556 of which was "SQL time." (It probably got faster once memcached was primed for my personal fragments).
Almost all of the time went into counting branches ("WHERE private = %s"—I assume %s is false; 2,005ms) and orphaned specifications (1,770ms).
The database can service the public-branches count in half a second once warmed up. (I'm not sure if we really need the branch count to exclude branches not visible to the user. Does that make sense for a global count?) In any case, there's probably no need for the global branch count to update interactively. We can get old but otherwise accurate numbers of public branches instantly from the postgres statistics.
The orphaned-
Then, a lot of database queries for the featured-project listing could be avoided by prejoining Product, Product.icon (LibraryFileAlias), Product.
Finally, all of this should be coming from the slave store!
affects: | launchpad → launchpad-registry |
tags: | added: performance tech-debt |
On Sun, Sep 12, 2010 at 3:45 PM, Jeroen T. Vermeulen
<email address hidden> wrote:
> Public bug reported:
>
> I'm having a look at the performance of the front page. It just took
> 5,331ms to render, 4,556 of which was "SQL time." (It probably got
> faster once memcached was primed for my personal fragments).
Do you mean 'launchpad.net', or one of the site specific root pages?
> Then, a lot of database queries for the featured-project listing could icon.content (LibraryFileCon tent), and the licensing information
> be avoided by prejoining Product, Product.icon (LibraryFileAlias),
> Product.
LibraryFileContent should never be needed by the appserver in GET requests.
If you saw requests for Product. icon.content, you probably were
looking at lpnet; have a look at edge - it shouldn't be doing that
lookup anymore.
-Rob