Improve QByteDataBuffer::read() performance with partial reads
authorAntti Harju <antti.harju@ixonos.com>
Wed, 24 Oct 2012 07:56:46 +0000 (10:56 +0300)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 2 Nov 2012 23:24:37 +0000 (00:24 +0100)
commit8fb379dc8a4d7069a99c3181283e581b86e99ceb
tree75b8b73b42a03a96db1c2b3f7958c4b439f93d0f
parent0d9eba94dc73366a4a222c90d3f8deccc4cb19c6
Improve QByteDataBuffer::read() performance with partial reads

Add a read position variable to eliminate excessive memcpy'ing when
reading a partial buffer.

Specifically, fix performance issue of reading large files from
QNetworkDiskCache in QtWebKit2.

Task-number: QTBUG-27522
Change-Id: I21edc909bf9223971b2c3db5f1fa6b89c5b61c5f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Antti Harju <antti.harju@ixonos.com>
src/corelib/tools/qbytedata_p.h
tests/auto/corelib/tools/qbytedatabuffer/.gitignore [new file with mode: 0644]
tests/auto/corelib/tools/qbytedatabuffer/qbytedatabuffer.pro [new file with mode: 0644]
tests/auto/corelib/tools/qbytedatabuffer/tst_qbytedatabuffer.cpp [new file with mode: 0644]
tests/auto/corelib/tools/tools.pro
tests/benchmarks/network/access/access.pro
tests/benchmarks/network/access/qnetworkreply_from_cache/.gitignore [new file with mode: 0644]
tests/benchmarks/network/access/qnetworkreply_from_cache/qnetworkreply_from_cache.pro [new file with mode: 0644]
tests/benchmarks/network/access/qnetworkreply_from_cache/tst_qnetworkreply_from_cache.cpp [new file with mode: 0644]