[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...
Github user klopfdreh commented on the issue: https://github.com/apache/wicket/pull/275 Hey @solomax - sadly I am totally busy right now, but I try my best to change this. ---
[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/275 @klopfdreh can you create wicketstuff module? ---
[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...
Github user klopfdreh commented on the issue: https://github.com/apache/wicket/pull/275 Due to the vote that Wicket is going to drop the support of Browser detection I am closing this branch right now. @solomax - yes why not a wicketstuff module. ð /closed ---
[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...
Github user solomax commented on the issue: https://github.com/apache/wicket/pull/275 I believe we can add browser detection as wicketstuff module and/or as confluence example Should be easy and useful ---
[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...
Github user nielsbasjes commented on the issue: https://github.com/apache/wicket/pull/275 On a more general note: I think the DeviceClass field might be useful for Wicket as it indicates if the device is a phone, tablet or desktop. ---
[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...
Github user nielsbasjes commented on the issue: https://github.com/apache/wicket/pull/275 @klopfdreh A few points about the slow startup. When you explicitly specify which fields you really need the system will completely 'not load' the rules that have no impact. Especially if you do not need the DeviceBrand/DeviceName the impact will be quite large. You can simply pass something like this .withField("AgentName") .withField("DeviceClass") .withField("AgentVersion") and it will have a big impact on both startup times and run times for a not yet cached parse. I had a look at your project and with this patch the startup time drops to less than 1.5 seconds. ``` diff --git pom.xml pom.xml index 00cc8f8..7910bd9 100644 --- pom.xml +++ pom.xml @@ -146,7 +146,7 @@ nl.basjes.parse.useragent yauaa - 4.2 + 4.5 com.google.code.findbugs diff --git wicket-core/src/main/java/org/apache/wicket/protocol/http/request/WebClientInfo.java wicket-core/src/main/java/org/apache/wicket/protocol/http/request/WebClientInfo.java index 5a02a3d..1e488e9 100644 --- wicket-core/src/main/java/org/apache/wicket/protocol/http/request/WebClientInfo.java +++ wicket-core/src/main/java/org/apache/wicket/protocol/http/request/WebClientInfo.java @@ -151,6 +151,9 @@ public class WebClientInfo extends ClientInfo { userAgentAnalyzer = UserAgentAnalyzer.newBuilder() .hideMatcherLoadStats() + .dropTests() + .withField("AgentName") + .withField("AgentVersion") .withCache(25000) .build(); Application.get().setMetaData(UAA_META_DATA_KEY, userAgentAnalyzer); @@ -217,7 +220,7 @@ public class WebClientInfo extends ClientInfo */ protected void setBrowserVersion(nl.basjes.parse.useragent.UserAgent parsedUserAgent) { - String value = parsedUserAgent.get("AgentVersion").getValue(); + String value = parsedUserAgent.getValue("AgentVersion"); if (!"Hacker".equals(value)) { properties.setBrowserVersion(value); ``` ---
[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...
Github user klopfdreh commented on the issue: https://github.com/apache/wicket/pull/275 To create UserAgentAnalyzer takes rather a long time. Maybe we are able to find a way to resolve the bottleneck, but my concerns to implement the browser detection in such a bad way like it was before also still hold. Also when I see the benchmarks I would consider to just inform about the bottleneck and keep it that way, or to turn it gatherExtendedInfo() off if 0.011ms are to much. ---
[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...
Github user svenmeier commented on the issue: https://github.com/apache/wicket/pull/275 My concerns still hold :( Most importantly: with that single UserAgentAnalyzer instance you've introduced a bottleneck for all concurrent request that need to gatherExtendedInfo(). ---
[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...
Github user klopfdreh commented on the issue: https://github.com/apache/wicket/pull/275 What about merging this? Or do we proceed with this PR after the release @bitstorm ? ---
[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...
Github user klopfdreh commented on the issue: https://github.com/apache/wicket/pull/275 I send you an invitation to the repo in which the branch of the PR is located. just push to it and merge if you are done. I think we are on a good way with this integration. ---
[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...
Github user klopfdreh commented on the issue: https://github.com/apache/wicket/pull/275 Hi @solomax - thanks a lot for the review. Because I am not able to work on it currently I am going to grant you access to my repo for further commits. Is this ok for you? ---
[GitHub] wicket issue #275: [WICKET-6544] mobile browser detection is improved (with ...
Github user klopfdreh commented on the issue: https://github.com/apache/wicket/pull/275 Following changes have been made: * The init() method has been changed into gatherExtendedInfo() which is only be executed if org.apache.wicket.settings.RequestCycleSettings.setGatherExtendedBrowserInfo(boolean) is set to true * MetaDataKey has been used to initialize YAUAA * All browser specific methods have been moved into detectBrowserProperties * gatherExtendedInfo / detectBrowserProperties are protected / public so that the user may override them ---