<html>Thx Michael, you are right, if an other thread would deflate (to disk) while SvXMLExport create the xml stream (in memory), and they would keep the memory stream under a size limitation, then it would be great.<br />I seen this producer / consumer pattern like thing in XBufferedThreadedStream .. and it is called in import time from ScXMLImportWrapper. (i do not rechecked it now.. somehow i remember that still wrote the stream into a file)<br />But in this export case, as i seen, the same thread do both of them, and deflate started only after SvXMLExport finished.<br /><br />the idea of having ready deflated streams on disk to pack into the zip archive sounds good, i bet in basic cases it is not a problem... im not sure about complex cases, like encription<br /><br />On Wednesday, May 17, 2023 16:46 BST, Michael Meeks <michael.meeks@collabora.com> wrote:<br /> <blockquote type="cite" cite="9b610851-f4c1-4501-9a32-753afe0b3ac8@collabora.com"><br />On 17/05/2023 15:42, Attila Szűcs wrote:<br />> I can see this file on my hard drive, so it is really here.<br />> i can view its content and it is a half made xml file<br />> content.xml (the whole file) ~110mb big, but the compressed ods is only<br />> ~670kb.<br />> so if it would be stored only in memory, we could avoid a lot of disk<br />> writing.<br /><br />Streaming to a file is fine - and in fact good =) -but- I expect that<br />if we have another thread that deflates this as we do the streaming out<br />- then we could save quite a chunk of I/O I think and perhaps get the<br />compression 'for free' (and deflate is far from free unfortunately).<br /><br />Of course, the idea of having ready deflated streams on disk to pack<br />into the zip archive may not fit perfectly into whatever conceptual<br />model but ... =)<br /><br />> i can understand that in most cases this extra file is not a big<br />> problem... and when the file is big enought to be a problem, than maybe<br />> the memory could be a bigger problem.. :)<br /><br />=)<br /><br />Michael.<br /><br />--<br />michael.meeks@collabora.com <><, GM Collabora Productivity<br />Hangout: mejmeeks@gmail.com, Skype: mmeeks<br />(M) +44 7795 666 147 - timezone usually UK / Europe</blockquote><br /><br /> </html>