Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7DF41200C52 for ; Mon, 10 Apr 2017 17:39:45 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7C9B2160B85; Mon, 10 Apr 2017 15:39:45 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C3B6C160B99 for ; Mon, 10 Apr 2017 17:39:44 +0200 (CEST) Received: (qmail 17235 invoked by uid 500); 10 Apr 2017 15:39:43 -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 17226 invoked by uid 99); 10 Apr 2017 15:39:43 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Apr 2017 15:39:43 +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 5D5EB180684 for ; Mon, 10 Apr 2017 15:39:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id BcY2PIqAHTA5 for ; Mon, 10 Apr 2017 15:39:42 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 7518F5FC6F for ; Mon, 10 Apr 2017 15:39:42 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 05CE7E0629 for ; Mon, 10 Apr 2017 15:39:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id BA2C42406A for ; Mon, 10 Apr 2017 15:39:41 +0000 (UTC) Date: Mon, 10 Apr 2017 15:39:41 +0000 (UTC) From: "Gary Gregory (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LOG4J2-1873) Implement UTF-8 encoding that doesn't use CharsetEncoder MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 10 Apr 2017 15:39:45 -0000 [ https://issues.apache.org/jira/browse/LOG4J2-1873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15963050#comment-15963050 ] Gary Gregory commented on LOG4J2-1873: -------------------------------------- ICU4J might have something we can optionally depend on or copy. > Implement UTF-8 encoding that doesn't use CharsetEncoder > -------------------------------------------------------- > > Key: LOG4J2-1873 > URL: https://issues.apache.org/jira/browse/LOG4J2-1873 > Project: Log4j 2 > Issue Type: Improvement > Reporter: Roman Leventov > > CharsetEncoder accepts only CharBuffers, and for the sake of being entirely garbage-free we don't want to use CharBuffer.wrap(stringBuilder), when encoding an event. > That forces us to make additional data copy from StringBuilder to a thread-local CharBuffer. > This could be avoided by implementing UTF-8 encoding logic in log4j-core itself, and not using CharsetEncoder. > This issue is specifically about UTF-8 because it is used predominantly and it's relatively easy to implement. There are also likely some open-source Apache 2-compatible implementations in Java out there already that we could just copy and adapt. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org