I'd recommend adopting Sara's suggestion; those memset()s you have
there shouldn't be needed:
char buf[GETS_FETCH_SIZE];
while (ret > 0) {
if (!f(stream, sizeof(buf), buf))
break;
php_stream_write_string(IMAPG(gets_stream), buf);
}
return NULL;
--Wez.
On 9/26/05, Michael Wallner <[
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
Use 8192 chunk size; anything bigger than that is a complete waste of memory.
--Wez.
On 9/22/05, Ilia Alshanetsky <[EMAIL PROTECTED]> 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
> > dump
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 meg