trichview.support
Re: SaveRVFToStream slow? |
Author |
Message |
Holger Warzelhan |
Posted: 08/23/2004 10:24:44 Wow, that works great! I set the size of the stream beforehand to 30MB, and my document that took 145 seconds to transfer to the stream is now transferred in 0.3s! Thank you very much for the hint! Now, to use this in a senseful way, I would have to know the size of the rvf document before calling SaveRVFToStream, in order to set the stream size. Is there a way to get the document size in bytes from the TRichViewEdit control? Thank you, Holger "Sergey Tkachenko" <svt@trichview.com> wrote: >So this is a limitation of TMemoryStream, I'm afraid. >May be it's because it reallocates memory many times when writting. > >Ideas... Try to use Stream.SetSize to set stream size so that it can contain >the whole RVF before saving. When set Stream.Position = 0, save RVF, then >SetSize(Stream.Position). >May be it will be faster. > > |
Powered by ABC Amber Outlook Express Converter