Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54300 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21962 invoked from network); 3 Aug 2011 00:26:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Aug 2011 00:26:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 213.123.20.125 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 213.123.20.125 c2bthomr07.btconnect.com Received: from [213.123.20.125] ([213.123.20.125:57142] helo=mail.btconnect.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3A/B0-17431-8A5983E4 for ; Tue, 02 Aug 2011 20:26:17 -0400 Received: from [10.0.0.4] (host81-138-11-136.in-addr.btopenworld.com [81.138.11.136]) by c2bthomr07.btconnect.com (MOS 4.2.2-FCS) with ESMTP id EAH42485; Wed, 3 Aug 2011 01:26:13 +0100 X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=tid=0001.0A0B0301.4E3895A4.0087, actions=TAG Message-ID: <4E3895A4.8000606@lsces.co.uk> Date: Wed, 03 Aug 2011 01:26:12 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.19) Gecko/20110420 SUSE/2.0.14-2.2 SeaMonkey/2.0.14 MIME-Version: 1.0 To: PHP internals References: <4E3814C9.2020407@lsces.co.uk> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Junkmail-Premium-Raw: score=7/50, refid=2.7.2:2011.7.19.51514:17:7.586, ip=81.138.11.136, rules=__MOZILLA_MSGID, __HAS_MSGID, __SANE_MSGID, __USER_AGENT, __MIME_VERSION, __TO_MALFORMED_2, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __CT, __CT_TEXT_PLAIN, __CTE, __ANY_URI, __URI_NO_MAILTO, __CP_URI_IN_BODY, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_1600_1699, __MIME_TEXT_ONLY, RDNS_GENERIC_POOLED, BODY_SIZE_5000_LESS, RDNS_SUSP_GENERIC, RDNS_SUSP, BODY_SIZE_2000_LESS, BODY_SIZE_7000_LESS X-Junkmail-Status: score=10/50, host=c2bthomr07.btconnect.com X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A0B0207.4E3895A6.002F,ss=1,fgs=0, ip=0.0.0.0, so=2010-07-22 22:03:31, dmn=2009-09-10 00:05:08, mode=multiengine X-Junkmail-IWF: false Subject: Re: [PHP-DEV] [VOTE] Weak References From: lester@lsces.co.uk (Lester Caine) Hannes Landeholm wrote: > Certain function in the application runs a MySQL procedure that updates a > certain complex selection of products in the products database rendering the > currently loaded products in memory obsolete since they might have been > updated. Then you are caching the wrong data in memory? Following an update like that one would either have to commit the changes or rollback. So the data has to be reloaded from the server anyway. You can't rely on any of the data already loaded. > Joe deploys the application again and can only hope that this was the > only loop that triggered the memory problem and that the application > doesn't crash anywhere else when the products table grows larger. So you are trying to load lots of unnecessary data from the database through poor design. Redesign the data so it works properly ... or switch to a database that handles business logic via triggers properly ;) You should only be downloading the data you need to look at, leave the volume data on the server. The majority of my business logic is done in the database (Firebird) and I simply can't see how I would ever fall into the trap you seem to be creating? Perhaps I am doing something wrong, but my systems all run multiuser real time and handle large numbers of records without these sorts of problem. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php