Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-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 B5D7110986 for ; Fri, 27 Feb 2015 21:56:05 +0000 (UTC) Received: (qmail 19223 invoked by uid 500); 27 Feb 2015 21:56:05 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 19124 invoked by uid 500); 27 Feb 2015 21:56:05 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 18932 invoked by uid 99); 27 Feb 2015 21:56:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Feb 2015 21:56:05 +0000 Date: Fri, 27 Feb 2015 21:56:05 +0000 (UTC) From: "Guillaume Nodet (JIRA)" To: dev@felix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FELIX-4810) Cache WeakZipFile#entries MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FELIX-4810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14340884#comment-14340884 ] Guillaume Nodet commented on FELIX-4810: ---------------------------------------- See also https://github.com/gnodet/felix/commit/17664f2f247265e895da3ee7f72fa5aa06f75b23 > Cache WeakZipFile#entries > ------------------------- > > Key: FELIX-4810 > URL: https://issues.apache.org/jira/browse/FELIX-4810 > Project: Felix > Issue Type: Improvement > Components: Framework > Reporter: Guillaume Nodet > Assignee: Guillaume Nodet > Fix For: framework-4.6.1 > > Attachments: FELIX-4810.patch > > > The WeakZipFile#entries() method is used in several places when there's a need to iterate through bundle resources. > That can happen quite a lot of times if there are multiple extenders. > Caching this value would allow: > * avoid scanning all bundles multiple times, especially when they are resolved / started > * given it mostly happen when the bundle is resolved or started, using a SoftReference makes sense to not consume memory while still providing a good caching behaviour -- This message was sent by Atlassian JIRA (v6.3.4#6332)