<div dir="ltr"><div class="gmail_extra">Hi Michael,</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 6, 2017 at 12:10 AM, Michael Meeks <span dir="ltr"><<a href="mailto:michael.meeks@collabora.com" target="_blank">michael.meeks@collabora.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Mohammed,<br>
<br>
        Now I read it again, I'm rather skeptical that:<br>
<br>
+        if( !maUsedBuffers.empty() )<br>
+        {<br>
+            pProducedBuffer = maUsedBuffers.front();<br>
+            maUsedBuffers.pop();<br>
+        }<br>
<br>
        is helpful. I'm not sure that we can re-use these buffers efficiently<br>
here - perhaps its better just to allocate new ones in the stream read<br>
method; can you profile with and without that (would love to get rid of<br>
the extra complexity if possible).<br><span class="gmail-HOEnZb"><font color="#888888"><br></font></span></blockquote><div>Here you go.</div><div><br></div><div>with UsedBuffers: <a href="https://demo.collaboracloudsuite.com/tdf/index.php/s/Hbsp5rI8FE7CHmF">https://demo.collaboracloudsuite.com/tdf/index.php/s/Hbsp5rI8FE7CHmF</a></div><div>without UsedBuffers: <a href="https://demo.collaboracloudsuite.com/tdf/index.php/s/PIcWD261zVcwpWj">https://demo.collaboracloudsuite.com/tdf/index.php/s/PIcWD261zVcwpWj</a></div><div><br></div><div>Regards,</div><div>Azeem</div></div><br></div></div>