ucb/source/ucp/file/filinpstr.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 2e6afbe65c75c919665927f62efa21140a020d46 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Wed Jul 11 08:13:48 2018 +0200 tdf#79877 perf loading docx file, activate SAX threading our nice threaded parser was not kicking in because it checks the size of the stream with available(), and this available() implementation was just returning 0. This makes for a 5-10% performance improvement Change-Id: I6516862c9c63136b54ca825dd98e35e6d87d4227 Reviewed-on: https://gerrit.libreoffice.org/57263 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/ucb/source/ucp/file/filinpstr.cxx b/ucb/source/ucp/file/filinpstr.cxx index 997605a79409..faa16cd2783a 100644 --- a/ucb/source/ucp/file/filinpstr.cxx +++ b/ucb/source/ucp/file/filinpstr.cxx @@ -155,7 +155,8 @@ XInputStream_impl::skipBytes( sal_Int32 nBytesToSkip ) sal_Int32 SAL_CALL XInputStream_impl::available() { - return 0; + sal_Int64 avail = getLength() - getPosition(); + return std::min<sal_Int64>(avail, SAL_MAX_INT32); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits