diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-10 11:51:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-10 17:59:45 +0100 |
commit | 17950f4d204e9947f125ebc0aac1156eba6501f2 (patch) | |
tree | 1b51bdc13a1006aeb29a6dff658ba1b3f1028708 /sot | |
parent | 952b3b227e02ae4eedce3138fcb39613bf12486d (diff) |
use less SvStream::Flush()
Flush() turns into a sync() on the device, which is pretty slow.
Most of the time all we actually want to do is to flush the internal
buffers from the SvStream.
So expose the FlushBuffer method and use that where possible.
And also means we don't need the mbDontFlushOnClose flag on SvStream
any more.
Change-Id: Ibe089b88b325f0fdc565200a97ce72cd26b7fcfb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128214
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/sdstor/storage.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx index cef5b3d7a02d..0381aa477a9e 100644 --- a/sot/source/sdstor/storage.cxx +++ b/sot/source/sdstor/storage.cxx @@ -69,12 +69,12 @@ SotTempStream::SotTempStream( const OUString & rName, StreamMode nMode ) SotTempStream::~SotTempStream() { - Flush(); + FlushBuffer(); } void SotTempStream::CopyTo( SotTempStream * pDestStm ) { - Flush(); // write all data + FlushBuffer(); // write all data sal_uInt64 nPos = Tell(); // save position Seek( 0 ); |