Joe Schaefer wrote:
Stas Bekman <[EMAIL PROTECTED]> writes:

[...]


Looks exactly the same internally as the perl for loop. The only
difference is that it calls apr_bucket_delete when it's done with
it. Which you can do with the for() loop just the same.


But you didn't *write* that, so we must be talking past each other. I thought the problem this thread was really about was

  If I'm trying to read all the data in a bucket brigade,
  *when* is it ok to remove or delete a bucket from the brigade?

The straightforward answer is that you should wait
until after you've called $b->read(), because read() has all kinds of side effects. The rest of this dialog seems to have taken us nowhere, so I'll just stop here.

OK. I did get something out of this discussion: one wants to delete the bucket to get allocation re-use (less memory, less CPU) (but not too soon, from where this thread has started).


But since apreq's upload always deals with the file bucket, you could make it faster by not using apr_bucket_read, but bypass it and allocate less memory and be faster, no?


-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to