Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19132 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61962 invoked by uid 1010); 22 Sep 2005 16:52:11 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 61946 invoked from network); 22 Sep 2005 16:52:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Sep 2005 16:52:11 -0000 X-Host-Fingerprint: 64.233.162.197 zproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.162.197:39883] helo=zproxy.gmail.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 4B/2D-24510-A31E2334 for ; Thu, 22 Sep 2005 12:52:11 -0400 Received: by zproxy.gmail.com with SMTP id 40so269180nzk for ; Thu, 22 Sep 2005 09:52:07 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Z5m2IglhgjjAeZHKL8ikDdEZZMUXG7RNdYaX6gXGtz4yFIAwL8ZtsO4QEtYMM5pP3+hcmKO2PfyPU9TvCB7lRXSyK36FsNVkNYE+YF4AA3Ctmdy1iEMTSMS39cqP+Yemyit9ieyvKxxXk2IeXXJbT7yEqhfeqe6ZfX+NosZKHTo= Received: by 10.54.52.46 with SMTP id z46mr3291769wrz; Thu, 22 Sep 2005 09:52:07 -0700 (PDT) Received: by 10.54.76.6 with HTTP; Thu, 22 Sep 2005 09:52:07 -0700 (PDT) Message-ID: <4e89b42605092209521cae7196@mail.gmail.com> Date: Thu, 22 Sep 2005 12:52:07 -0400 Reply-To: Wez Furlong To: Ilia Alshanetsky Cc: Sara Golemon , Michael Wallner , internals@lists.php.net In-Reply-To: <4332DC28.1090305@prohost.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <79.1A.24510.546D2334@pb1.pair.com> <002b01c5bf91$c4d2f550$5c8be5a9@ohr.berkeley.edu> <4332DC28.1090305@prohost.org> Subject: Re: [PHP-DEV] Re: [PATCH] imap_savebody() From: kingwez@gmail.com (Wez Furlong) Use 8192 chunk size; anything bigger than that is a complete waste of memor= y. --Wez. On 9/22/05, Ilia Alshanetsky wrote: > Sara Golemon wrote: > >>#define GETS_FETCH_SIZE 2048000 > >> > > > > That size doesn't seem a bit excessive to you? I thought the whole poi= nt of > > dumping it to a file was to avoid huge memory chunks. Not to mention t= he > > fact that reserving 2MB of stack space makes me a little twitchy... > > Indeed, 2 megs of stack space seems a bit much, not to mention > completely bypassed PHP's memory limit. I'd recommend allocating 1 > megabyte buffer via emalloc(), a bit slower, but much "nicer" IMHO. > > > Ilia > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >