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

Optimize http requests for static resources in the analysis plugins

    Details

    • Similar Issues:

      Description

      By using the firebug add-on in firefox, we can see that there are unnecessary http requests for the static resources of the analysis plugins.

      For example, for every display of https://builds.apache.org/job/Ant_Nightly/
      there are unnecessary http requests for findbugs-24x24.png and tasks-24x24.png (see "project page.png"). The browser should know that this is useless to ask.

      And for every display of https://builds.apache.org/job/Ant_Nightly/tasks
      there are unnecessary http requests for utilities.js, dispatcher-min.js, findbugs-24x24.png, tasks-24x24.png, spinner.gif and clearpixel.gif (see "tasks page.png").

      According to https://groups.google.com/forum/#!msg/jenkinsci-dev/qQf7Tuu6uiw/_WO7OBj_LIkJ
      this can be fixed by using "Jenkins.getResourcePath()" or $

      {resURL}

      .

      Firebug can be used locally to check the changes.

        Attachments

          Issue Links

            Activity

            Hide
            drulli Ulli Hafner added a comment -

            Hmm, this is on my todo list for a long time now... I need to check if there is a better workaround available, since my plug-ins still depend on Jenkins 1.409 which has no Jenkins class yet. Maybe Functions.getResourcePath() does the trick.

            Show
            drulli Ulli Hafner added a comment - Hmm, this is on my todo list for a long time now... I need to check if there is a better workaround available, since my plug-ins still depend on Jenkins 1.409 which has no Jenkins class yet. Maybe Functions.getResourcePath() does the trick.
            Hide
            evernat evernat added a comment -

            I have just seen JENKINS-16530.
            Would it better for findbugs-24x24.png and tasks-24x24.png with that?

            Show
            evernat evernat added a comment - I have just seen JENKINS-16530 . Would it better for findbugs-24x24.png and tasks-24x24.png with that?
            Hide
            jglick Jesse Glick added a comment -

            JENKINS-16530 fixes it automatically for task links, generally Action impls. For other things you need to use resURL (which is also f.resourcePath).

            BTW 1.409 is very old and you cannot build analysis plugins using JDK 7 because of this baseline. I would recommend an LTS baseline of at least 1.424.

            Show
            jglick Jesse Glick added a comment - JENKINS-16530 fixes it automatically for task links, generally Action impls. For other things you need to use resURL (which is also f.resourcePath ). BTW 1.409 is very old and you cannot build analysis plugins using JDK 7 because of this baseline. I would recommend an LTS baseline of at least 1.424.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            pom.xml
            src/main/java/hudson/plugins/analysis/core/AbstractProjectAction.java
            src/main/java/hudson/plugins/analysis/core/AbstractResultAction.java
            src/main/java/hudson/plugins/analysis/core/BuildResult.java
            http://jenkins-ci.org/commit/analysis-core-plugin/5c7bcfb3959873569d545c3adbcf682791af4a95
            Log:
            JENKINS-16571 Prefix all static icon URLs with RESOURCE_PREFIX.


            You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
            For more options, visit https://groups.google.com/groups/opt_out.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pom.xml src/main/java/hudson/plugins/analysis/core/AbstractProjectAction.java src/main/java/hudson/plugins/analysis/core/AbstractResultAction.java src/main/java/hudson/plugins/analysis/core/BuildResult.java http://jenkins-ci.org/commit/analysis-core-plugin/5c7bcfb3959873569d545c3adbcf682791af4a95 Log: JENKINS-16571 Prefix all static icon URLs with RESOURCE_PREFIX. – You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out .
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            pom.xml
            src/main/resources/hudson/plugins/analysis/collector/dashboard/WarningsTablePortlet/portlet.jelly
            http://jenkins-ci.org/commit/analysis-collector-plugin/441ec6184e3d27141bbfd5217d14e49d37a7886c
            Log:
            JENKINS-16571 Use $

            {resUrl}

            rather than rootUrl for static icon URLs.


            You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
            For more options, visit https://groups.google.com/groups/opt_out.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pom.xml src/main/resources/hudson/plugins/analysis/collector/dashboard/WarningsTablePortlet/portlet.jelly http://jenkins-ci.org/commit/analysis-collector-plugin/441ec6184e3d27141bbfd5217d14e49d37a7886c Log: JENKINS-16571 Use $ {resUrl} rather than rootUrl for static icon URLs. – You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out .
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            src/main/resources/result/main.jelly
            src/main/resources/util/graphtype.jelly
            src/main/resources/util/health.jelly
            src/main/resources/util/thresholds.jelly
            http://jenkins-ci.org/commit/analysis-core-plugin/2be77cf07e08012b3574c64839d5c96244c914cc
            Log:
            [FIXED JENKINS-16571] Use $

            {resUrl}

            for static icon URLs.


            You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
            For more options, visit https://groups.google.com/groups/opt_out.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/resources/result/main.jelly src/main/resources/util/graphtype.jelly src/main/resources/util/health.jelly src/main/resources/util/thresholds.jelly http://jenkins-ci.org/commit/analysis-core-plugin/2be77cf07e08012b3574c64839d5c96244c914cc Log: [FIXED JENKINS-16571] Use $ {resUrl} for static icon URLs. – You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out .
            Hide
            drulli Ulli Hafner added a comment -

            Integrated in Jenkins Analysis Plug-ins (Compile) #609
            JENKINS-16571 Prefix all static icon URLs with RESOURCE_PREFIX. (Revision 5c7bcfb3959873569d545c3adbcf682791af4a95)
            [FIXED JENKINS-16571] Use $

            {resUrl}

            for static icon URLs. (Revision 2be77cf07e08012b3574c64839d5c96244c914cc)

            Result = SUCCESS

            Show
            drulli Ulli Hafner added a comment - Integrated in Jenkins Analysis Plug-ins (Compile) #609 JENKINS-16571 Prefix all static icon URLs with RESOURCE_PREFIX. (Revision 5c7bcfb3959873569d545c3adbcf682791af4a95) [FIXED JENKINS-16571] Use $ {resUrl} for static icon URLs. (Revision 2be77cf07e08012b3574c64839d5c96244c914cc) Result = SUCCESS

              People

              • Assignee:
                drulli Ulli Hafner
                Reporter:
                evernat evernat
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: