[Libreoffice-commits] .: vcl/source
Michael Meeks
mmeeks at kemper.freedesktop.org
Fri Oct 15 07:25:58 PDT 2010
vcl/source/gdi/impimagetree.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 333cdc483c76753bdb9d310c2a556659aca65169
Author: Michael Meeks <michael.meeks at novell.com>
Date: Fri Oct 15 15:23:48 2010 +0100
reduce large realloc / realloc thrash for image reading.
diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx
index e2dc6ba..5143596 100644
--- a/vcl/source/gdi/impimagetree.cxx
+++ b/vcl/source/gdi/impimagetree.cxx
@@ -85,8 +85,8 @@ std::auto_ptr< SvStream > wrapStream(
OSL_ASSERT(stream.is());
std::auto_ptr< SvStream > s(new SvMemoryStream);
for (;;) {
- css::uno::Sequence< sal_Int8 > data;
- sal_Int32 const size = 30000;
+ sal_Int32 const size = 2048;
+ css::uno::Sequence< sal_Int8 > data(size);
sal_Int32 n = stream->readBytes(data, size);
s->Write(data.getConstArray(), n);
if (n < size) {
More information about the Libreoffice-commits
mailing list