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 15:46:02 UTC

[jira] [Assigned] (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 reassigned WICKET-5605:
---------------------------------------

    Assignee: Martin Grigorov

> 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
>
> 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)