Almost after one year, I finally did this at https://wiki.jenkins-ci.org/display/JENKINS/Hyperlinks+in+HTML

On 03/23/2012 02:30 AM, Arnaud Héritier wrote:
Did you put that somewhere in the wiki in a plugin development guideline
(or something like that ?)

Arnaud

On Tue, Mar 20, 2012 at 11:59 PM, Kohsuke Kawaguchi
<[email protected] <mailto:[email protected]>> wrote:


    I was looking into the performance of the page rendering for
    upcoming 1.458, and made some improvements to the way plugins access
    static resources. Taking advantages of this requires help from
    plugin developers, so here is a call for action.

    In short, you should be using ${resURL} and not ${rootURL} for
    accessing static files in your plugin. Or in code, it'd be
    "Jenkins.getResourcePath()".

    [1] and [2] shows the concrete examples of those changes. If
    respective plugin developers can make those changes in their
    plugins, we'd collectively improve the user experience.

    This is especially high priority for plugins that provide
    PageDecorator extension points, as they inject some stuff into every
    single page.


    For Jenkins 1.458 and later, this change will make those static
    resources served with long Expires header, enabling the browser to
    cache them (and use them without contacting the server again with
    the "If-Modified-Since" header). These URLs will look like
    "/static/..../plugin/git/abc.__png" where "...." portion changes for
    each server reboot. This ensures that the browser never uses a stale
    file when plugins are updated.

    For Jenkins 1.457 and earlier, "/static/.../" will serve the
    intended resource but without any "Expires" header. So it degrades
    nicely.

    The reason this change is important is because it saves browsers
    from making pointless GET requests with an "If-Modified-Since"
    header, only to get "304 Not Modified" response from the server.
    Each such request/response pair costs a packet round trip (which can
    be easily in the order of 100ms if you access ci.jenkins-ci.org
    <http://ci.jenkins-ci.org> from Europe or Asia.) And because most
    browsers do not implement HTTP pipelining or have it disabled by
    default, this latency gets multiplied by the number of such resources.

    This issue gets even worse by x3 to x4 for some deployments that
    utilizes HTTP intermediaries that do not support keep alive
    (including http://ci.jenkins-ci.org/ until a few hours ago),
    resulting in slow down that can be measured in the order of second.


    This is a part of the UI enhancement drive, and performance is a
    feature. Thanks in advance for helping making Jenkins faster, and
    let me know if there's any questions.



    [1]
    
https://github.com/jenkinsci/__translation-plugin/commit/__d0731c366a6829d2a120e24642b313__36810e6eb0
    
<https://github.com/jenkinsci/translation-plugin/commit/d0731c366a6829d2a120e24642b31336810e6eb0>
    [2]
    
https://github.com/jenkinsci/__git-plugin/commit/__53ffd3bd4e78269a8c9c9a786ad032__1d7542150d
    
<https://github.com/jenkinsci/git-plugin/commit/53ffd3bd4e78269a8c9c9a786ad0321d7542150d>
    --
    Kohsuke Kawaguchi | CloudBees, Inc. | http://cloudbees.com/
    Try Nectar, our professional version of Jenkins




--
-----
Arnaud Héritier
06-89-76-64-24
http://aheritier.net
Mail/GTalk: [email protected] <mailto:[email protected]>
Twitter/Skype : aheritier



--
Kohsuke Kawaguchi | CloudBees, Inc. | http://cloudbees.com/
Try Nectar, our professional version of Jenkins

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


Reply via email to