c++ - Reading from a file not line-by-line -
Specify a QTextStream
as a QFile
and it By reading line-by-line is easy and works fine, but I am surprised that the performance can be insulated by first saving the file in memory and then processing it by line-by-line.
Using sysinternals, I have encountered that the file is read in a section of 16 kb and since the process I started, it is not big (~ 2 MB, but many !), It would be a good thing to try to load them into memory
Any ideas how can I do this? QFile
is placed inside from QIODevice
, which allows me in ReadAll ()
in QByteArray
, but Then how to proceed
QTextStream has a ReadAll function:
Surely all you need?
Or you can read all and QTextStream can take it as an input rather than a QFile.
Comments
Post a Comment