Launchpad should make external files cacheable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
New
|
Undecided
|
Unassigned |
Bug Description
Launchpad is the slowest website I visit on a regular basis (with the possible exception of Sourceforge). I recently examined a random bug report using the Firebug and YSlow Firefox plugins and discovered the primary reason. That page (which I viewed after another bug so it should have had mostly cached content) took 24-26 seconds to load, depending on which number you believe (screenshot attached). The vast majority of the time was spent downloading one CSS file and four Javascript files, which the browser don't cache. Firefox won't render any part of a page until all CSS and Javascript have loaded and been parsed. In my opinion, this is a bug in Firefox, but nevertheless, it's the way it is.
Compounding the problem is the fact that HTTP requests are expensive, and HTTPS is hugely more expensive. In addition, I have satellite Internet, which has a lot of latency. I rarely see ping times of under one second. So any problems caused by improper caching are magnified on my end.
My recommendation is to set a far future expires header on all CSS and Javascript files (along with all those images that don't set Expires headers, which is most of them). I don't know the internal workings of Launchpad, but it appears that the Javascript files already use effectively-
The reason that it's important to set an expires header is that the browser can cache the data until the expiration date without even querying Launchpad to see if it's been modified or if the ETag matches. (Such a request would itself be expensive.)
As I was verifying that my attachements worked properly, I noticed that the back button is even broken. Firefox's status bar told me that it was "transferring data" after I hit the back button! This makes the back button really slow (20 seconds). Again it's imporper caching that's to blame, as the attached Firebug shot shows. I can't imagine why Firefox would hit Launchpad in the first place, since I hit back, not refresh. I don't know if this is a bug in Firefox that needs to be worked around, or if Launchpad is doing something improper.