Wicket
  1. Wicket
  2. WICKET-4216

Enhance AjaxServerAndClientTimeFilter to use HTML5's Navigation Timing API

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Trivial Trivial
    • Resolution: Unresolved
    • Affects Version/s: 6.0.0-beta1
    • Fix Version/s: None
    • Component/s: wicket
    • Labels:
      None
    • Environment:
      All

      Description

      in AjaxServerAndClientTimeFilter.java, instead of:

      map.put("clienttime", "' + (new Date().getTime() - clientTimeVariable)/1000 + 's");

      Wicket could use:

      map.put("clienttime", "' + (new Date().getTime() - performance.timing.navigationStart)/1000 + 's");

      which could output something like:

      Server parsetime: .01s, User-perceived page loading time: .02s

      https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html

        Activity

        Hide
        Martin Grigorov added a comment - - edited

        I think this ticket shouldn't be "Trivial"
        NavigationTiming is not widely supported. It has been added in Firefox in ver. 7. I'm not sure what is the state in IE but I'd bet IE7/8 don't have it.
        Maybe we should move that logic to wicket-ajax-debug.js (the code for the Ajax Debug Window) because status bar is also not that common these days and window.defaultStatus is not immediately visible anymore. There we can add check for support of 'performance' and fallback to the old code.

        Show
        Martin Grigorov added a comment - - edited I think this ticket shouldn't be "Trivial" NavigationTiming is not widely supported. It has been added in Firefox in ver. 7. I'm not sure what is the state in IE but I'd bet IE7/8 don't have it. Maybe we should move that logic to wicket-ajax-debug.js (the code for the Ajax Debug Window) because status bar is also not that common these days and window.defaultStatus is not immediately visible anymore. There we can add check for support of 'performance' and fallback to the old code.
        Hide
        Martin Grigorov added a comment -
        Show
        Martin Grigorov added a comment - We may use something like https://github.com/nicjansma/usertiming.js

          People

          • Assignee:
            Unassigned
            Reporter:
            Robert McGuinness
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development