[dev] Imap_Client / streams.

Michael J Rubinsky mrubinsk at horde.org
Tue May 5 14:34:24 UTC 2015


Quoting Michael J Rubinsky <mrubinsk at horde.org>:

> I'm having a hard time trying to track down some memory usage issues  
> I'm seeing and in doing so, I'm trying to better understand what is  
> going on in HIC;  When fetching a specific mime part, like e.g. an  
> attachment, does HIC always use streams, or does it put the entire  
> part's contents in memory at some point? E.g:
>
> $bodypart_params = array(
>   'decode' => true,
>   'peek' => true
> );
> $query->bodyPart($mime_id, $bodypart_params);
>
> $fetch_res = $this->_imap->fetch(
>   $this->_mbox,
>   $query,
>   array('ids' => new Horde_Imap_Client_Ids(array($uid)))
> );
>
>
> If $mime_id is some large attachment, will it ever be placed  
> completely in memory or is at contained in a temporary stream at all  
> times?


Forgot to include that it's being retrieved with the stream option set  
to true, but I don't think this has anything to do with how it's  
actually stored internally when it's retrieved from the IMAP server.

$fetch_res[$uid]->getBodyPart($id, true);

-- 
mike
The Horde Project
http://www.horde.org
https://www.facebook.com/hordeproject
https://www.twitter.com/hordeproject
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5869 bytes
Desc: S/MIME Signature
URL: <http://lists.horde.org/archives/dev/attachments/20150505/4c5d2c0a/attachment.bin>


More information about the dev mailing list