Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 10327 invoked from network); 13 Dec 2010 03:27:54 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 Dec 2010 03:27:54 -0000 Received: (qmail 80583 invoked by uid 500); 13 Dec 2010 03:27:53 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 80159 invoked by uid 500); 13 Dec 2010 03:27:51 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 80151 invoked by uid 99); 13 Dec 2010 03:27:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Dec 2010 03:27:50 +0000 X-ASF-Spam-Status: No, hits=2.7 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,REPTO_QUOTE_YAHOO,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [66.196.97.112] (HELO web57008.mail.re3.yahoo.com) (66.196.97.112) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 13 Dec 2010 03:27:42 +0000 Received: (qmail 96386 invoked by uid 60001); 13 Dec 2010 03:27:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1292210841; bh=besrOA8+8Cit2vn9qAnWWmv4kn2Q/+PIZgVdtRAz6Ww=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=3c+VXDT1Nj26VnNuM3blZRZQmFsjrzQnV7wO9YWYj9HkO5s0lGJUfzwQKrxyojyHpCJeXmt/BkgRs24uDrmaQ9p6mUODYUcpbdCNMbnwNFgMavDfuXQXt95LhGZJUpbS6eaK0GKYYmaI4+yB7tOnu6ZVEhBZAwnKSIZulcPGFnY= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=zrKE9sjcmky25znA+QoW9DwW41bEyZFyWhN0TP7cb6rHGjG5FVNiM9il63kowxMZ9Ky+aXNK6us05xjtTMcrZYpe/5CMrh1KaHQ0TR/nisOopF40ZSI5AuVl6dxRStZjlDXgmquUhCBf84ENoxJ8EFfurVulFKhtQaBkLKDpkrQ=; Message-ID: <414465.95634.qm@web57008.mail.re3.yahoo.com> X-YMail-OSG: CZkyT1UVM1lYclUp67XN83wsjctmRbb0i1GOfWi8SY6A9_M lY_ptxjozbgzztgA0TpC1mZ25MzPwUTNwd4fN95PRZ1KdMzLlMbLsM2Pymai KMSG_gGY_K4QVa5fNVD8j.a0cz3PgV0qEPrAjBJUkyyBKXv9eLRUEtbLFnIW 4CsYP0IBxt77EgKrTz4CS5tm7TGMx5q2A8U9n_OHx_Eb0QmF3wb59eKU6Rn5 vV3.xRrU2FghxBxJ.ZqV8QaNDHchyscphPGtl.j9C3O_cj356A7PeX8QFuWy te68wiu1BP1QXwP1DsOkRSWkXfupSj9apD.8V7IpwaRA1N8d6ssdl97X.isO SCKU05vGhh94enbhun3MtoL.dbrYpauW3wfu0KNH7_jLzfZBSPpAA77_EwYK iXIilGJcd9zA- Received: from [89.39.186.45] by web57008.mail.re3.yahoo.com via HTTP; Sun, 12 Dec 2010 19:27:21 PST X-Mailer: YahooMailWebService/0.8.107.285259 Date: Sun, 12 Dec 2010 19:27:21 -0800 (PST) From: "Balazs Attila-Mihaly \(Cd-MaN\)" Reply-To: "Balazs Attila-Mihaly \(Cd-MaN\)" Subject: [collections] To: "dev@commons.apache.org" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1514470296-1292210841=:95634" --0-1514470296-1292210841=:95634 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello everybody.=0A=0AI would like to know if there would be any interest o= f including a "disk-backed map" into the commons-collections? The problem s= tatement for it would be:=0A=0A- while we are moving to 64bit, it will stil= l take a couple of years until all hardware is 64 bit and more importantly,= all software (or at least the OS + JVM running on it) are 64 bit. In the m= eantime you can easily run out of memory space, even though you physically = would have enough memory and you would accept some swapping (rather than th= e process dying with OOM). I had such an issue with running PMD CPD on a la= rger codebase (2+ million LOC).=0A=0AThe solution:=0A=0A- a Map which keeps= its keys in memory but writes the values to disk (to a temporary file, mar= ked deleteOnExit). It also keeps WeakRefs to the values. When a request com= es in for a value, it tries to satisfy it using the weakref, and if it fail= s, it reads it back from the temporary file. This would be efficient for a = mostly read-intensive application (it does not try to efficiently handle th= e situations when there are many removes/updates to the file).=0A=0AWould y= ou be interested in including this solution in the framework?=0A=0ABest reg= ards (and happy holidays),=0AAttila=0A=0A=0A=0A --0-1514470296-1292210841=:95634--