Re: Re: [PATCH] imap_savebody()
| From: | Wez Furlong | Date: | Thu, 22 Sep 2005 16:52:07 +0000 |
| Subject: | Re: Re: [PATCH] imap_savebody() | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-19132@lists.php.net to get a copy of this message | ||
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:
> >>#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
>
>