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 D72DE20049E for ; Thu, 10 Aug 2017 15:55:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D59B716B51F; Thu, 10 Aug 2017 13:55:05 +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 2C44816B51C for ; Thu, 10 Aug 2017 15:55:05 +0200 (CEST) Received: (qmail 13024 invoked by uid 500); 10 Aug 2017 13:55:04 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 12942 invoked by uid 99); 10 Aug 2017 13:55:03 -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; Thu, 10 Aug 2017 13:55:03 +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 5E1CD180834 for ; Thu, 10 Aug 2017 13:55:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.918 X-Spam-Level: X-Spam-Status: No, score=0.918 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_FAIL=0.919] 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 7QZHuyjmavnc for ; Thu, 10 Aug 2017 13:55:02 +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 5218260DCF for ; Thu, 10 Aug 2017 13:55:02 +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 A3977E065D for ; Thu, 10 Aug 2017 13:55:01 +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 D9A5B24185 for ; Thu, 10 Aug 2017 13:55:00 +0000 (UTC) Date: Thu, 10 Aug 2017 13:55:00 +0000 (UTC) From: "Thomas Andraschko (JIRA)" To: dev@myfaces.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (MYFACES-3528) CLONE - Performance Improvements MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 10 Aug 2017 13:55:06 -0000 [ https://issues.apache.org/jira/browse/MYFACES-3528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Andraschko updated MYFACES-3528: --------------------------------------- Resolution: Won't Fix Status: Resolved (was: Patch Available) As 1.x is in maintenance mode and this is "just" a improvement, i would close this for now. > CLONE - Performance Improvements > -------------------------------- > > Key: MYFACES-3528 > URL: https://issues.apache.org/jira/browse/MYFACES-3528 > Project: MyFaces Core > Issue Type: Improvement > Affects Versions: 1.1.9 > Reporter: Krashan Brahmanjara > Assignee: Martin Marinschek > Fix For: 1.1.11-SNAPSHOT > > Attachments: ApplicationImpl.java, _ComponentAttributesMap.java > > > Last week I did some JMeter testing, profiling and code checking on MyFaces to try increase the overall performance. Here are my suggestions for improvement: > *) _ComponentAttributesMap > I introduced a cache for maps with component attributes. This cache avoids rebuilding the map for every instance of the same component class. It is implemented using a WeakHashMap to allow the GC to remove entries that are not referenced in any instance. > *) UIComponentBase > Made a few changes in isIdValid as it is called quite often. The new id is now checked against the old id and if it is the same it is assumed as valid (avoids checking chars). Additionally I use isLetterOrDigit() and access string chars directly insted of fetching an array first. > *) ImplicitObjectResolver > I replaced List with Map to avoid iteration over lists. > *) HtmlResponseWriterImpl > Use new method of HTMLEncoder for char[] > *) HTMLEncoder > Improved performance of encode mthod and added a new one that takes a char[] und directly writes to a writer. > *) UnicodeEncoder > Replaced StringBuffer with StringBuilder. -- This message was sent by Atlassian JIRA (v6.4.14#64029)