diff options
author | João Abecasis <joao@trolltech.com> | 2010-01-07 12:31:08 (GMT) |
---|---|---|
committer | João Abecasis <joao@trolltech.com> | 2010-01-07 15:33:26 (GMT) |
commit | 3b57425aa11e5e1536016ccccdde7657493a0dc8 (patch) | |
tree | de9b196b7971906c757641903f0ac250ef193687 /doc/src/snippets/code | |
parent | ce5f772c529517c3e1c043fd826a790316ed9915 (diff) | |
download | Qt-3b57425aa11e5e1536016ccccdde7657493a0dc8.zip Qt-3b57425aa11e5e1536016ccccdde7657493a0dc8.tar.gz Qt-3b57425aa11e5e1536016ccccdde7657493a0dc8.tar.bz2 |
Avoid double-buffering in QFile
Since Qt 4.3 QIODevice has been providing read buffering for buffered
devices; QFile provides a write buffer. Thus, requesting a buffered file
from the engine results in unnecessary double-buffering where this is
supported natively.
By preferring QFile/QIODevice's buffering over the file engine we reduce
the number of system calls.
On the other hand, buffering inside QIODevice can't easily be disabled
without changing the return value of QIODevice::openMode() (function is
non-virtual).
Reviewed-by: Thiago Macieira
Diffstat (limited to 'doc/src/snippets/code')
0 files changed, 0 insertions, 0 deletions