Hi all,
i would like to know if somebody knows about how fast QDataStream can write into a file?
( in MByte / second )
// 8mb string
for(int i = 0; i < 8388608; i++)
{
s.append("o");
}
// writing 1GB data in the file
for(int i = 0; i < 256; i++)
{
out << b
}
QFile file("test.txt");
QDataStream out(&file);
out.setByteOrder(QDataStream::LittleEndian);
file.open(QIODevice::WriteOnly);
QString s = "";
// 8mb string
for(int i = 0; i < 8388608; i++)
{
s.append("o");
}
QByteArray b = s.toLocal8Bit();
// writing 1GB data in the file
for(int i = 0; i < 256; i++)
{
out << b
}
To copy to clipboard, switch view to plain text mode
in this test i get a datarate of ~90 MByte/sec.
Is there any way to improve the speed or has anybody information about QDataStream's speed?
Thanks
Bookmarks