Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19146 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85970 invoked by uid 1010); 24 Sep 2005 05:34:56 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 85955 invoked from network); 24 Sep 2005 05:34:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Sep 2005 05:34:56 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:55204] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 66/98-24510-F75E4334 for ; Sat, 24 Sep 2005 01:34:55 -0400 Received: (qmail 18368 invoked from network); 24 Sep 2005 05:34:50 -0000 Received: from localhost (HELO ANDI-NOTEBOOK.zend.com) (127.0.0.1) by localhost with SMTP; 24 Sep 2005 05:34:50 -0000 Message-ID: <6.2.3.4.2.20050923223334.06a16eb0@localhost> X-Mailer: QUALCOMM Windows Eudora Version 6.2.3.4 Date: Fri, 23 Sep 2005 22:34:45 -0700 To: Wez Furlong ,Ilia Alshanetsky Cc: Sara Golemon ,Michael Wallner , internals@lists.php.net In-Reply-To: <4e89b42605092209521cae7196@mail.gmail.com> References: <79.1A.24510.546D2334@pb1.pair.com> <002b01c5bf91$c4d2f550$5c8be5a9@ohr.berkeley.edu> <4332DC28.1090305@prohost.org> <4e89b42605092209521cae7196@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] Re: [PATCH] imap_savebody() From: andi@zend.com (Andi Gutmans) Yep, I agree with that, and some past tests of mine showed that depending on the system, anything bigger than about 8-64K, will give marginal performance increase (and possibly decrease depending on memory allocation); so it's really not worth the hassle. It's also a size which we can allocate on the stack. Andi At 09:52 AM 9/22/2005, Wez Furlong wrote: >Use 8192 chunk size; anything bigger than that is a complete waste of memory. > >--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 point of > > > dumping it to a file was to avoid huge memory chunks. Not to mention the > > > 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 > > > > > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php