You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2014/06/15 17:33:01 UTC

[jira] [Resolved] (WICKET-5605) Store browser capabilities in local variables in wicket-event-jquery.js

     [ https://issues.apache.org/jira/browse/WICKET-5605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-5605.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 6.17.0
                   7.0.0-M3

> Store browser capabilities in local variables in wicket-event-jquery.js
> -----------------------------------------------------------------------
>
>                 Key: WICKET-5605
>                 URL: https://issues.apache.org/jira/browse/WICKET-5605
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>            Reporter: Marc Nuri
>            Assignee: Martin Grigorov
>            Priority: Minor
>              Labels: easyfix, performance
>             Fix For: 7.0.0-M3, 6.17.0
>
>
> Methods in Wicket.Browser js class (such as isIE, isKHTML, isSafari... ) perform a regular expression test in windows.navigator.userAgent variable each time they are called.
> It would improve performance if these methods stored their result in a variable for future checks.
> As described in this InMethodGrid issue (https://github.com/wicketstuff/core/issues/308#issuecomment-44816191), recursive calls to these methods in a Windows environment with Chrome version 35 are killing the CPU.
> The solution is as simple as caching the result of the regexp test the first time the method is called and return the variable value in subsequent calls.



--
This message was sent by Atlassian JIRA
(v6.2#6252)