Re: Re: [PATCH] imap_savebody()
| From: | Andi Gutmans | Date: | Sat, 24 Sep 2005 05:34:45 +0000 |
| Subject: | Re: Re: [PATCH] imap_savebody() | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-19146@lists.php.net to get a copy of this message | ||
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 <ilia@prohost.org> wrote: Sara Golemon wrote:whole point ofThat size doesn't seem a bit excessive to you? I thought the#define GETS_FETCH_SIZE 2048000dumping 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