Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
5.4.0
-
*Build Environment*
MSVC 2010
*Qt Environments*
Static 4.8.0 Qt -
configure -static -debug-and-release -no-libtiff -no-libpng -no-libmng -no-libjpeg -no-openssl -mp -platform win32-msvc2010
nmake sub-src
Static 5.4.0 Qt -
configure -static -debug-and-release -no-libpng -no-libjpeg -no-openssl -opengl desktop -mp -platform win32-msvc2010
nmake sub-src
Shared 4.8.0 and 5.4.0 x86 msvc2010 libraries downloaded from the website
*OS Environments*
Windows 7 Enterprise SP1, Dual Intel Core i5-2450M CPU @ 2.50 GHz, 8 GB RAM
Windows Server 2008 R2 Standard, Dual Intel Xeon CPU E5-1650 @ 3.20 GHz, 32 GB RAM*Build Environment* MSVC 2010 *Qt Environments* Static 4.8.0 Qt - configure -static -debug-and-release -no-libtiff -no-libpng -no-libmng -no-libjpeg -no-openssl -mp -platform win32-msvc2010 nmake sub-src Static 5.4.0 Qt - configure -static -debug-and-release -no-libpng -no-libjpeg -no-openssl -opengl desktop -mp -platform win32-msvc2010 nmake sub-src Shared 4.8.0 and 5.4.0 x86 msvc2010 libraries downloaded from the website *OS Environments* Windows 7 Enterprise SP1, Dual Intel Core i5-2450M CPU @ 2.50 GHz, 8 GB RAM Windows Server 2008 R2 Standard, Dual Intel Xeon CPU E5-1650 @ 3.20 GHz, 32 GB RAM
Description
When compared to Qt 4.8.0 on the same environment, byte array deserialization through the QIODevice read method is 6 (static 64 bit build) to 8 (qt provided 32 bit dll) times slower on a Windows 7 environment.
I used this code to reproduce the slowdown:
Note: Code ran on it's own processing thread aside from the main thread
Note: AT5_ASSERT is an assert control to the main thread
Note: AT5_STATUS is a status message control to the main thread
Note: m_Settings.m_StrBlk.x is a integer containing 100 million for my test runs
AT5_ASSERT(m_Settings.m_StrBlk.x > 0, "Block Size Must be Greater Than 0."); AT5_STATUS(QString("Attempting Byte Array Deserialization(%1 bytes)").arg(m_Settings.m_StrBlk.x)); QByteArray data(m_Settings.m_StrBlk.x, Qt::Uninitialized); QIODevice* pIODevice = new QBuffer(&data); if(pIODevice == NULL) { AT5_STATUS("Failed to Initialize IO Device"); } else { if(!pIODevice->open(QIODevice::ReadOnly)) { AT5_STATUS("Failed to Open IO Device"); } else { //Parse Data QTime stopWatch; tUChar byte; stopWatch.start(); for(int x = 0; x < m_Settings.m_StrBlk.x; ++x) { pIODevice->read(reinterpret_cast<char*>(&byte), 1); } AT5_STATUS(QString("Run Time: %1 ms").arg(stopWatch.elapsed())); pIODevice->close(); } delete pIODevice; }
Timings on test runs showed 550 ms->3225 ms time increases on my static build and 825 ms->6400 ms time increases on qt provided dlls.
Slowdowns on my actual applications were in the 25%-30% range with some people reporting 10000% (4 hours to 45 hours) increases but not personally verified.
Issue appears partially related to QTBUG-28968.