Details
-
Type:
Bug
-
Status: Reported
-
Priority:
P2: Important
-
Resolution: Unresolved
-
Affects Version/s: 4.8.5, 5.2.0 Beta1
-
Fix Version/s: None
-
Component/s: Network: Cache
-
Labels:None
Description
QCacheItem::read does a lot of small, operator based QDataStream reads.
That is be fine as long as the underlying device is buffered, which is the case in ::metaData() call.
But during the actual ::data() call, the cachefile header is re-read, this time with unbuffered device, see qnetworkdiskcache.cpp:415-418:
if (!file->open(QFile::ReadOnly | QIODevice::Unbuffered))
return 0;
if (!d->lastItem.read(file.data(), true)) {
This is causing heavy I/O and an order of mangitude slowdown of given operation on small cache entries