Hi all,

i would like to know if somebody knows about how fast QDataStream can write into a file?
( in MByte / second )

Qt Code:
  1. QFile file("test.txt");
  2. QDataStream out(&file);
  3. out.setByteOrder(QDataStream::LittleEndian);
  4. file.open(QIODevice::WriteOnly);
  5.  
  6. QString s = "";
  7.  
  8. // 8mb string
  9. for(int i = 0; i < 8388608; i++)
  10. {
  11. s.append("o");
  12. }
  13.  
  14. QByteArray b = s.toLocal8Bit();
  15.  
  16. // writing 1GB data in the file
  17. for(int i = 0; i < 256; i++)
  18. {
  19. out << b
  20.  
  21. }
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