Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 34997 invoked from network); 21 Jul 2008 21:46:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Jul 2008 21:46:26 -0000 Received: (qmail 53074 invoked by uid 500); 21 Jul 2008 21:46:25 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 52719 invoked by uid 500); 21 Jul 2008 21:46:24 -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 52703 invoked by uid 99); 21 Jul 2008 21:46:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Jul 2008 14:46:24 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Jul 2008 21:45:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9C298234C172 for ; Mon, 21 Jul 2008 14:45:31 -0700 (PDT) Message-ID: <697536939.1216676731638.JavaMail.jira@brutus> Date: Mon, 21 Jul 2008 14:45:31 -0700 (PDT) From: "Blake Sullivan (JIRA)" To: dev@myfaces.apache.org Subject: [jira] Commented: (TRINIDAD-1164) getFacetsAndChildren from UIXComponentBase allocates a lot of memory In-Reply-To: <823182438.1216668811651.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 [ https://issues.apache.org/jira/browse/TRINIDAD-1164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615442#action_12615442 ] Blake Sullivan commented on TRINIDAD-1164: ------------------------------------------ In the case where both the list of indexed children and the map of facet children are non-empty, Trinidad should be returning a compositer iterator, delegating to the other two iterators, rather than using an ArrayList. > getFacetsAndChildren from UIXComponentBase allocates a lot of memory > -------------------------------------------------------------------- > > Key: TRINIDAD-1164 > URL: https://issues.apache.org/jira/browse/TRINIDAD-1164 > Project: MyFaces Trinidad > Issue Type: Bug > Affects Versions: 1.2.8-core > Reporter: Stevan Malesevic > > getFacetsAndChildren of UIXComponentBase is invoked number of times during request processing (_findInsideOf , decode,....). In the case where component has facets the code will rebuild a ArrayList on every invocation. This is very expensive in terms of total allocated transient memory and CPU. We should save the ArrayList of facets and children first time it is built and recreate only in case of change. > Also, the call _facets.values() which creates iterator seems very expensive. Maybe better approach is to just do: > for(int i = 0; i < _facets.size(); i++) > { > childrenAndFacets.add(((FacetHashMap)_facets).getValue(i)); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.