When attachment_tnef 0.7 plugin processes compressed rtf parts in TnefFileRTF::uncompress_rtf, it stores processed data in array. One array key for one byte. It is highly inefficient way of generating data that eventually is converted to string with implode(). If winmail.dat has 5.7 MB rtf part, peak memory usage is over 300 MB even when PHP caching is used.
Peak memory usage before "$result = $attachment->decodeTnef($tnef);" call is only 20 MB and it already includes 17 MB taken by tnef message body loaded into memory.
Log in to post a comment.