Return-Path: X-Original-To: apmail-logging-log4j-dev-archive@www.apache.org Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 72B6D18ED1 for ; Mon, 15 Feb 2016 23:47:12 +0000 (UTC) Received: (qmail 85449 invoked by uid 500); 15 Feb 2016 23:47:12 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 85391 invoked by uid 500); 15 Feb 2016 23:47:12 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 85381 invoked by uid 99); 15 Feb 2016 23:47:12 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Feb 2016 23:47:12 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id D690D1805E7 for ; Mon, 15 Feb 2016 23:47:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.199 X-Spam-Level: ** X-Spam-Status: No, score=2.199 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, HTML_MESSAGE=2, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id roF-aV82D93Z for ; Mon, 15 Feb 2016 23:47:10 +0000 (UTC) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id C9DD95F1B9 for ; Mon, 15 Feb 2016 23:47:09 +0000 (UTC) Received: by mail-pa0-f43.google.com with SMTP id yy13so92489184pab.3 for ; Mon, 15 Feb 2016 15:47:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:mime-version:subject :message-id:date:references:in-reply-to:to; bh=XwSEQZ+cs61jEl8f8WUlj4EcXzisU+wBl9rzu1ttMW8=; b=hvJjgdFClMbKGMPu6wgP33MUjWNL8oGGL8lSwEnDZ4oRnGrwMyZabpZ2Zp5X1KADhh 2W3+QQ++V17Ju+US/dLSQEBUsJMqrUYb3ewByuozPIb/sP7p9HyChC4DBzj/zq1wuQVe Y4Ni+5RA5xmxbJqVqLqftAxoPAMHTAFUpZIh1uNw7glqI0qKo6uTHr2Stkb334wQefLp ITzOenS/nTHqDnrrzsw8delfXUsa4Po4iIbGaZTfRYaFrcoAKz5Z6uPk1Vgqiq/zcU0U 4HKtq5mCAGsGlSjMwrS4ZJ0852tMvdzSDEReuTKyGbUwy5886zEG8Xk4L2gqNirhuyh6 n9kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-type:content-transfer-encoding :mime-version:subject:message-id:date:references:in-reply-to:to; bh=XwSEQZ+cs61jEl8f8WUlj4EcXzisU+wBl9rzu1ttMW8=; b=DzGuWuPOR0cnhXZ0SJWMn2fksuV51oSpg++/7aJEVlUMYTerSoxOQa75DxpAgIltgj vF2Zb1r58xTDRcfMXEuBl8AOPBJbP2I52DAuXU123RmxYt1enWzM1OZ4woDA0mtqYSuI C9xh7+h4UeqzWIDR+Z1BnV87PudtQNatyOS8+mRcWoLLYHbb3NKyXo0MEbJTdCjJbBHj 0rNJAOJLNAdHsUS5JW+ZqFPWRuegukcqs6tHg/itQNJ/76HmPzBKudEXLHDJvLgzP0HV wpUzY6eoiz8jDHp+Hjy8inMShUuO14MRXrIqZOd59LiJU5RnPzo7SbLUDcgfCAhZia5j 1wHw== X-Gm-Message-State: AG10YORvkQYsFDFFuJQKA78nrl0E4ztIl6mTxIOCD5Xrvw5V1BgKF0W1PH/DPnbBDlsMNQ== X-Received: by 10.66.62.229 with SMTP id b5mr24461212pas.114.1455580022302; Mon, 15 Feb 2016 15:47:02 -0800 (PST) Received: from [10.3.243.189] (pw126255015206.9.panda-world.ne.jp. [126.255.15.206]) by smtp.gmail.com with ESMTPSA id dg1sm40992718pad.18.2016.02.15.15.47.01 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 15 Feb 2016 15:47:01 -0800 (PST) From: Remko Popma Content-Type: multipart/alternative; boundary=Apple-Mail-CD729C08-6095-4467-ACBC-7EB8F5475E9F Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (1.0) Subject: Re: traceExit and auto-boxing Message-Id: <59594147-6DA5-4870-BFE1-CBB5841E18B5@gmail.com> Date: Tue, 16 Feb 2016 08:46:55 +0900 References: In-Reply-To: To: Log4J Developers List X-Mailer: iPhone Mail (13D15) --Apple-Mail-CD729C08-6095-4467-ACBC-7EB8F5475E9F Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable A word of caution: the Logger API already has 209 method (and I think a few j= ust got added). This will explode if we just add "var-arg unrolling" methods= for 1 param, 2 params, 3 params, ... (up to how many?) Especially if we wa= nt to also prevent auto boxing in all possible combinations of the primitive= types boolean, long and double.=20 There may be other ways to accomplish this. Let's think about this a bit lon= ger. I'll add a Jira for this in the no-GC epic. =20 Sent from my iPhone > On 2016/02/16, at 1:59, Matt Sicker wrote: >=20 > Considering the garbage-free epic, this sounds like a good idea to bake in= from the start. >=20 >> On 15 February 2016 at 10:39, Gary Gregory wrote= : >> Hi All: >>=20 >> My my custom flow logger, I avoid auto-boxing on traceExit() calls by hav= ing primitive versions of the APIs. We could do the same and avoid auto-boxi= ng unless a logger's level is enabled. >>=20 >> This generates a lot less garbage when, for example, we flow trace our JD= BC APIs and get 50m rows and 50 columns per row. >>=20 >> Thoughts? >>=20 >> Gary >>=20 >> --=20 >> E-Mail: garydgregory@gmail.com | ggregory@apache.org=20 >> Java Persistence with Hibernate, Second Edition >> JUnit in Action, Second Edition >> Spring Batch in Action >> Blog: http://garygregory.wordpress.com=20 >> Home: http://garygregory.com/ >> Tweet! http://twitter.com/GaryGregory >=20 >=20 >=20 > --=20 > Matt Sicker --Apple-Mail-CD729C08-6095-4467-ACBC-7EB8F5475E9F Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
A word of caution: the Logger API alre= ady has 209 method (and I think a few just got added). This will explode if w= e just add "var-arg unrolling" methods for 1 param, 2 params, 3 params, ... &= nbsp;(up to how many?) Especially if we want to also prevent auto boxing in a= ll possible combinations of the primitive types boolean, long and double.&nb= sp;

There may be other ways to accomplish this. Let's think about this a bi= t longer. I'll add a Jira for this in the no-GC epic.  

Sent fro= m my iPhone

On 2016/02/16, at 1:59, Matt Sicker <boards@gmail.com> wrote:

Considering the garbage-free epic= , this sounds like a good idea to bake in from the start.

On 15 February 2016 at 10:39, G= ary Gregory <garydgregory@gmail.com> wrote:
Hi All:

My my custom f= low logger, I avoid auto-boxing on traceExit() calls by having primitive ver= sions of the APIs. We could do the same and avoid auto-boxing unless a logge= r's level is enabled.

This generates a lot less gar= bage when, for example, we flow trace our JDBC APIs and get 50m rows and 50 c= olumns per row.

Thoughts?




--
Matt Sicker <boards@gmail.com>
= --Apple-Mail-CD729C08-6095-4467-ACBC-7EB8F5475E9F--