KIO directory listing - CPU slows down SSD

David Faure faure at kde.org
Fri May 30 07:35:13 UTC 2014


On Wednesday 28 May 2014 19:33:42 Aaron J. Seigo wrote:
>    int endPoint = ds.device()->pos();
>     ds.device()->seek(savePoint);
>     ds << 0;
>     ds.device()->seek(endPoint);
>     ds << 1337;
>     ++records;

This could break if QDataStream decides to buffer the changes, i.e. not flush 
before you seek() the underlying device. But OK the API docs for QDataStream 
don't mention buffering, the buffering happens one layer down, in QIODevice 
itself.

My other fear was a header when starting a new QDataStream but you're not 
doing that, so that's fine :)

OK, I stand corrected, thanks for the example code. Looks good to me.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5



More information about the Kde-frameworks-devel mailing list