Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 92742 invoked from network); 13 Sep 2007 13:51:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Sep 2007 13:51:00 -0000 Received: (qmail 19294 invoked by uid 500); 13 Sep 2007 13:50:47 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 19281 invoked by uid 500); 13 Sep 2007 13:50:47 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 19270 invoked by uid 99); 13 Sep 2007 13:50:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Sep 2007 06:50:46 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aaron.trevena@gmail.com designates 64.233.182.185 as permitted sender) Received: from [64.233.182.185] (HELO nf-out-0910.google.com) (64.233.182.185) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Sep 2007 13:50:43 +0000 Received: by nf-out-0910.google.com with SMTP id k4so519121nfd for ; Thu, 13 Sep 2007 06:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=Zdvqo64nqcXN0Hw8wjDsdg3SnkRqG5IOh+RH0m4vbOI=; b=Cgal9WOXs5jn2nF6bG5n1vvKYuqPlTMhkuEX2AOZ2J3X0Hl/F1O50rzKU2hAPD5fvJl7OINai8NcmOTbc91z1M0DmNFirOih9BgX5KX5WjdfifAcplUsW+LBZFiYzuuIo2V1S/BPUzL/b0VTZQg9AIRb17ZaMP/oDIBIYuxmxA8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=o/WVIX8GZypgLb6n+Bf184tcJeCASc163kdrrpZkiQ0IL85Q+3O3CYPe3W7+juWtOZ6y0a3qxckRaVLWVilRk7dhyqiwMr/htzr8TVENvrD62Tv4t4xmqApSw67EnW+wc+dwpku1gJbBwTUCCHhLtearY65mI45rqgnlarTai4A= Received: by 10.78.160.2 with SMTP id i2mr360848hue.1189691421621; Thu, 13 Sep 2007 06:50:21 -0700 (PDT) Received: by 10.78.131.7 with HTTP; Thu, 13 Sep 2007 06:50:21 -0700 (PDT) Message-ID: Date: Thu, 13 Sep 2007 14:50:21 +0100 From: "Aaron Trevena" To: "modperl mod_perl" Subject: Re: Memory usage In-Reply-To: <4b3372230709111028h6d700126s94b3e5c17857b701@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4b3372230709111028h6d700126s94b3e5c17857b701@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi Will, How many keys will your hashes contain? The main memory wastage with hashes isn't due to the size of what you keep in them but the number of keys. If you are using integers as keys, why not just use an array? Bare in mind that the 'hashspace' is shared between your hashes, so if you have a lot of hashes with only a relatively small number of entries (i.e. hundreds rather than thousands) you might want to look at using Binary::Tree::Dictionary - something I wrote when I needed a lot of low memory hash/dictionarys for relatively small data sets in a perl daemon. A. -- http://www.aarontrevena.co.uk LAMP System Integration, Development and Hosting