Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42388 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71964 invoked from network); 28 Dec 2008 00:08:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Dec 2008 00:08:17 -0000 Authentication-Results: pb1.pair.com header.from=kevin@phpro.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=kevin@phpro.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain phpro.org from 80.76.201.53 cause and error) X-PHP-List-Original-Sender: kevin@phpro.org X-Host-Fingerprint: 80.76.201.53 swamp.phpro.org Received: from [80.76.201.53] ([80.76.201.53:34883] helo=swamp.phpro.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B9/77-47432-F63C6594 for ; Sat, 27 Dec 2008 19:08:17 -0500 Received: from kevin.kev ([58.172.208.9]) by swamp.phpro.org (8.13.8/8.13.8) with SMTP id mBS0UjTx013097 for ; Sun, 28 Dec 2008 11:30:46 +1100 Date: Sun, 28 Dec 2008 11:08:08 +1100 To: internals@lists.php.net Message-ID: <20081228110808.107e0f0d.kevin@phpro.org> In-Reply-To: <495645A5.4080802@dealnews.com> References: <5faa7b820812260106p6f24bf0ct49ef574e5ed4e2c2@mail.gmail.com> <20081227005523.2961ecd4.kevin@phpro.org> <5faa7b820812261004j599e1aafo6fab154063c34cca@mail.gmail.com> <20081227191015.560d4a0d.kevin@phpro.org> <495645A5.4080802@dealnews.com> Organization: PHPRO X-Mailer: Sylpheed version 2.0.4 (GTK+ 2.10.4; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Proposal: array_flatten function From: kevin@phpro.org (Kevin Waterson) This one time, at band camp, Brian Moon wrote: > I would agree except that doing lots of work on arrays in user space > consumes a lot of memory because of the number of opcodes used when > working on removing/adding things to the array. This is exactly the scenario for which SPL Iterators were created > We created an extension for Phorum to do our array tree sorting for > those users that had large threads of messages (1000+). We found that > PHP would quickly consume a memory limit of 128MB and use tons of CPU > when working in user space to simply reorder an array. Were you using SPL Iterators? Kevin