Return-Path: X-Original-To: apmail-devicemap-commits-archive@www.apache.org Delivered-To: apmail-devicemap-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 327431027C for ; Wed, 10 Dec 2014 14:38:13 +0000 (UTC) Received: (qmail 57108 invoked by uid 500); 10 Dec 2014 14:38:13 -0000 Delivered-To: apmail-devicemap-commits-archive@devicemap.apache.org Received: (qmail 57074 invoked by uid 500); 10 Dec 2014 14:38:13 -0000 Mailing-List: contact commits-help@devicemap.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@devicemap.apache.org Delivered-To: mailing list commits@devicemap.apache.org Received: (qmail 57062 invoked by uid 99); 10 Dec 2014 14:38:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Dec 2014 14:38:12 +0000 Date: Wed, 10 Dec 2014 14:38:12 +0000 (UTC) From: =?utf-8?Q?Volkan_Yaz=C4=B1c=C4=B1_=28JIRA=29?= To: commits@devicemap.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DMAP-107) Performance optimizations for DeviceMapClient.classify() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DMAP-107?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Volkan Yaz=C4=B1c=C4=B1 updated DMAP-107: ------------------------------- Attachment: classify.diff > Performance optimizations for DeviceMapClient.classify() > -------------------------------------------------------- > > Key: DMAP-107 > URL: https://issues.apache.org/jira/browse/DMAP-107 > Project: DeviceMap > Issue Type: Improvement > Components: Java Client > Affects Versions: 1.1.0 Java > Reporter: Volkan Yaz=C4=B1c=C4=B1 > Assignee: Reza Naghibi > Attachments: classify.diff > > > This patch removes redundant {{DeviceType}} checks and User-Agent string = normalization calls. Performance gain is more than 2x. Check out the device= map-client-benchmark (introduced in issue DMAP-106) output: > {code} > $ export userAgentFile=3D/path/to/user-agents.txt > $ wc -l $userAgentFile > 195325 > $ java \ > -jar devicemap/java/classifier-benchmark/target/devicemap-client-benc= hmark.jar \ > -jvmArgsAppend "-server -XX:+TieredCompilation -XX:+AggressiveOpts -X= ms1024m -Xmx4096m -DuserAgentFile=3D$userAgentFile" \ > -wi 5 -i 5 -bm avgt -tu ms -f 3 \ > ".*DeviceMapClientBenchmark.*" > # Using the most recent trunk. > Result: 12079.408 =C2=B1(99.9%) 1240.628 ms/op [Average] > Statistics: (min, avg, max) =3D (11232.424, 12079.408, 16011.000), stde= v =3D 1160.484 > Confidence interval (99.9%): [10838.781, 13320.036] > # Using the enhanced classify(). > Result: 5505.355 =C2=B1(99.9%) 441.748 ms/op [Average] > Statistics: (min, avg, max) =3D (5060.269, 5505.355, 6508.699), stdev = =3D 413.211 > Confidence interval (99.9%): [5063.607, 5947.103] > {code} > JVM version: 1.8.0_25 > OS: OS X 10.9.5 > Processor: 2.6 GHz Intel Core i5 -- This message was sent by Atlassian JIRA (v6.3.4#6332)