Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 91714 invoked from network); 28 Jun 2006 07:56:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Jun 2006 07:56:07 -0000 Received: (qmail 19453 invoked by uid 500); 28 Jun 2006 07:56:07 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 19420 invoked by uid 500); 28 Jun 2006 07:56:06 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 19406 invoked by uid 99); 28 Jun 2006 07:56:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jun 2006 00:56:06 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jun 2006 00:56:05 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2D50E7141F3 for ; Wed, 28 Jun 2006 07:54:30 +0000 (GMT) Message-ID: <31813984.1151481270155.JavaMail.jira@brutus> Date: Wed, 28 Jun 2006 07:54:30 +0000 (GMT+00:00) From: "Rustem Rafikov (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Commented: (HARMONY-673) perf improving for util.logging.Logger In-Reply-To: <11089223.1151400449778.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-673?page=comments#action_12418192 ] Rustem Rafikov commented on HARMONY-673: ---------------------------------------- yes, 1. With this patch I've got ~5% boost on SPECJbb2005 which activelly uses util.logging. 2. The attached file is microbenchmark which measures cost of logging call in the following cases: - logging is ON, use parent is TRUE - logging is ON, use parent is FALSE - logging is OFF, use parent is TRUE - logging is OFF, use parent is FALSE for example it shows improvement in ~3 times when logging is enabled and use-parent is set to FALSE; and ~70% when logging is disabled by setting Level.OFF to a logger. > perf improving for util.logging.Logger > -------------------------------------- > > Key: HARMONY-673 > URL: http://issues.apache.org/jira/browse/HARMONY-673 > Project: Harmony > Type: Improvement > Components: Classlib > Reporter: Rustem Rafikov > Priority: Minor > Attachments: logging.patch > > I would like to suggest a patch improving performance of util.logging.Logger. > Summary of changes: > 1. Frequently (on each logging call) used internalIsLoggable method became not synchronized and not "walking" through parents if a logger should inherit a parent level. As setLevel occures much rarely than log call it is preferable to inherit a parent level when setting a parent and when changing a parent. internalIsLoggable uses int value of log level to avoid extra call to Level.intValue() method. > 2. Main log method uses getHandlers returning array of handlers on each logging call. So, handlers.toArray(new Handler[0]) has been changed to handlers.toArray(new Handler[handlers.size()]) to avoid excessive creation of the array. It is much faster. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira