Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-16530

<l:task> fails to serve plugin icons as static resources

XMLWordPrintable

      Run Jenkins with --accessLoggerClassName=winstone.accesslog.SimpleAccessLogger --simpleAccessLogger.file=/tmp/access.log and then tail -n +0 -f /tmp/access.log | fgrep 304 to see every case when a resource is served which could have been cached. In stock Jenkins you will see /plugin/translation/flags.png on every page, and if you run with a lot of plugins this count goes up; e.g. for Jenkins Enterprise by CloudBees a job page can also load /plugin/nectar-rbac/images/24x24/groups.png, /plugin/nectar-rbac/images/24x24/roles.png, /plugin/cloudbees-folder/images/24x24/move.png, /plugin/skip-plugin/images/24x24/skip-off.png, and /plugin/cloudbees-secure-copy/images/24x24/exports.png, and also /plugin/nectar-vmware/24x24/vmware.gif at top level.

      All these HTTP requests add load to the handling thread (especially when all the various security and logging filters are processed), and may add some I/O load depending on the container. The overhead is increased considerably if auto refresh is enabled. All that work is wasted since these icons can be safely cached by the browser.

      task.jelly tries to prepend Jenkins.RESOURCE_PATH to images, which works for built-in actions but fails for actions provided by plugins (assuming they define their own icons). The flags.png problem was fixed in translation-1.9.hpi, but Jenkins still bundles 1.8.

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: