Complete the conversion to sprites

Bug #590621 reported by Jeroen T. Vermeulen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Won't Fix
Low
Unassigned

Bug Description

According to webpagetest.org, the spinner image has no expiry date set and so will not be cached. And yet it is fetched even for pages that as far as I know do not show the spinner. So ensuring that this is cached could shave a request off every page load after the first one, and free up a browser connection for other images.

The lack of caching also goes for a bunch of other images including product-logo, arrowRight, branch, bug, blueprint, and merge-proposal-icon.

Revision history for this message
Curtis Hovey (sinzui) wrote :

Product logos may be a bit tricky since they are in the librarian. The other images should not be used. I think old code is calling obsolete icons. All these icons are in the sprite files. We may need a report and target this bug to each app that breaks the rules.

affects: launchpad → launchpad-web
Revision history for this message
Curtis Hovey (sinzui) wrote :
Download full text (15.4 KiB)

These are the obvious problems.

lib/canonical/widgets/templates/datetime.pt
      14: <img src="/@@/edit"/>
lib/canonical/launchpad/javascript/bugs/offical_bug_tags.js
     355: '<img src="/@@/error" />
lib/canonical/launchpad/javascript/bugs/bugtask-index.js
     210: '<img src="/@@/spinner" style="display: none" />
lib/canonical/launchpad/javascript/lp/lp.js
     119: '<img src="/@@/treeExpanded" class="collapseIcon" />

lib/canonical/launchpad/templates/launchpad-graphics.pt
      35: Examples are <img src="/@@/distribution-badge" />
      36: <img src="/@@/person-badge" />
     123: <td><img src="/@@/arrowUp" />
     128: <td><img src="/@@/arrowDown" />
     133: <td><img src="/@@/arrowStart" />
     138: <td><img src="/@@/arrowEnd" />
     143: <td><img src="/@@/arrowTop" />
     148: <td><img src="/@@/arrowBottom" />
     153: <td><img src="/@@/arrowLeft" />
     158: <td><img src="/@@/arrowRight" />
     163: <td><img src="/@@/bullet" />
     215: <td><img src="/@@/download" />
     223: <td><img src="/@@/download-large" />
     227: <td><img src="/@@/edit" />
     306: <td><img src="/@@/list" />
     316: <td><img src="/@@/mail" />
     416: <td><img src="/@@/remove" />
     424: <td><img src="/@@/rss" />
     429: <td><img src="/@@/rss-large" />
     433: <td><img src="/@@/search" />
     438: <td><img src="/@@/security" />
     443: <td><img src="/@@/security-large" />
     454: <td><img src="/@@/subscriber-essential" />
     459: <td><img src="/@@/subscriber-inessential" />
     515: <td><img src="/@@/treeCollapsed" />
     521: <td><img src="/@@/treeExpanded" />
     544: <td><img src="/@@/zoom-in" />
     549: <td><img src="/@@/zoom-out" />
     554: <td><img src="/@@/overview-bg-button" />
     572: <td><img src="/@@/bugs-bg-button" />
     578: <td><img src="/@@/bug" />
     586: <td><img src="/@@/bug-critical" />
     591: <td><img src="/@@/bug-high" />
     596: <td><img src="/@@/bug-medium" />
     601: <td><img src="/@@/bug-low" />
     606: <td><img src="/@@/bug-wishlist" />
     611: <td><img src="/@@/bug-undecided" />
     616: <td><img src="/@@/bug-remote" />
     622: <td><img src="/@@/bug-unknown" />
     627: <td><img src="/@@/bug-dupe-icon" />
     632: <td><img src="/@@/bugtracker-icon" />
     637: <td><img src="/@@/cve" />
     649: <td><img src="/@@/blue-bar" width="48" height="16" />
     654: <td><img src="/@@/green-bar" width="48" height="16" />
     659: <td><img src="/@@/purple-bar" width="48" height="16" />
     664: <td><img src="/@@/red-bar" width="48" height="16" />
     674: <td><img src="/@@/translation" />
     681: <td><img src="/@@/translation-file" />
     686: <td><img src="/@@/translation-template" />
     696: <td><img src="/@@/blueprint" />
     702: <td><img src="/@@/blueprint-essential" />
     706: <td><img src="/@@/blueprint-high" />
     710: <td><img src="/@@/blueprint-medium" />
     714: <td><img src="/@@/blueprint-low" />
     718: <td><img src="/@@/blueprint-not" />
     722: <td><img src="/@@/blueprint-undefined" />
     731: <td><img src="/@@/code-bg-button" />
     737: <td><img src="/@@/branch" />
     742: <td><img src="/@@/branch-large" />
     746: <td><img src="/@@/merge-pr...

Changed in launchpad-web:
status: New → Triaged
importance: Undecided → Low
tags: added: tech-debt
summary: - Spinner image re-fetched all the time?
+ Complete the conversion to sprites
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

AFAIK there is no spinner among the sprites. I always assumed this was deliberate: there'd be little point in animating the whole sheet just to make the spinner spin. It may also limit the choice of formats for the sprites sheet.

The spinner was my main concern here since it appears to be requested for every page.

Revision history for this message
Curtis Hovey (sinzui) wrote :

The CSS is requested by all but 4 pages on launchpad. the spinner doed not approach that level of ubiquity. I see many scripts and support markup hard code the image. I am sure this is because lazr.js is not Launchpad. The spinner is mangaged by the resource directive and is intended to be cached by the proxy. mthaddon setup the proxy rules a few years ago.

Revision history for this message
Curtis Hovey (sinzui) wrote :

There are a handful of template that use images instead of sprites, and these can be fixed as needed. The spinner, and many images that are content cannot be sprites. The spinner issue cited in this bug is cause by by the nasty iframe-based help that is loaded on every page. Fixing bug 295254 will remove the unessessary calls to load the frame and the spinner.

Changed in launchpad:
status: Triaged → Won't Fix
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.