Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:30878 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83981 invoked by uid 1010); 13 Jul 2007 00:57:09 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 83961 invoked from network); 13 Jul 2007 00:57:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jul 2007 00:57:09 -0000 Authentication-Results: pb1.pair.com header.from=scottmac@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=scottmac@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 72.36.186.210 as permitted sender) X-PHP-List-Original-Sender: scottmac@php.net X-Host-Fingerprint: 72.36.186.210 midden.org.uk Received: from [72.36.186.210] ([72.36.186.210:41684] helo=lovelace.midden.org.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7F/D0-10261-FDDC6964 for ; Thu, 12 Jul 2007 20:57:07 -0400 Received: from macvicar.demon.co.uk ([80.177.111.173] helo=[192.168.1.102]) by lovelace.midden.org.uk with esmtp (Exim 4.63) (envelope-from ) id 1I992m-0002In-CS; Fri, 13 Jul 2007 01:30:00 +0100 Message-ID: <4696C77B.2060005@php.net> Date: Fri, 13 Jul 2007 01:29:47 +0100 User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: David CC: 'Stanislav Malyshev' , 'Sebastian Bergmann' , internals@lists.php.net References: <46969CCA.3010608@zend.com> <000901c7c4e3$2b803030$82809090$@com> In-Reply-To: <000901c7c4e3$2b803030$82809090$@com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Mid-term Update for Cycle Collector (Google Summer of Code Project) From: scottmac@php.net (Scott MacVicar) Hi, David wrote: > Hi all, > >> -----Original Message----- >> From: news [mailto:news@sea.gmane.org] On Behalf Of Sebastian Bergmann >> Sent: Thursday, July 12, 2007 2:52 AM > >> As a first step, I think the code changes that convert direct accesses >> to the reference counters to the proper macros should be merged. These >> changes should be done in any case and it minimizes your patch and >> makes >> it more readable. > > I'll get on that. Should I create a patch for 5.2 only, or should one for > HEAD be created as well? > >> -----Original Message----- >> From: Stanislav Malyshev [mailto:stas@zend.com] >> Sent: Thursday, July 12, 2007 2:28 PM > >> Indeed, memory usage reduction is very impressive - though I'm somewhat >> surprised so much memory is wasted, is this some special very circular >> case? > > The Template test does indeed involve a lot of cycles, which is why it was > recommended to me as a good test case. However any program that generates a > large amount of objects that are self-referential can do the same thing. > See: http://bugs.php.net/bug.php?id=33595 > >> However, twofold speed reduction can be bad - but maybe it can be >> optimized. > > Yes, that's very true. Although, anything that involves checking and freeing > over a gigabyte worth of objects is going to take a long time. I'll keep > working on it. > > My current priority for optimization is reducing overhead for acyclic > programs. Three bytes are added to the zval struct with the current > implementation and that struct is copied around a lot. Most notably, this > causes an annoying 5% slow down in bench.php. I'm not certain what real > world impact this has, but data with the php.ini option zend.enable_gc set > to 0 would be very helpful. Could the garabage collector be started / stopped during script executing from a userland function? zend_gc_enable/disable() in addition to an ini option to enable it at script startup? It would give developers the opportunity to start the checking mechanism if they knew they were working with acyclic objects. > > > David > Scott